Skip to content

Commit 0a11d0c

Browse files
committed
Initial Commit
Signed-off-by: gokulakannant <gokulakannanthangaraji@gmail.com>
0 parents  commit 0a11d0c

File tree

11 files changed

+3875
-0
lines changed

11 files changed

+3875
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
Documentation

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/
2+
webpack.config.js
3+
*/**/*.ts
4+
*/**/tsconfig.json
5+
*.tgz
6+
7+
!*/**/*.d.ts

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### React Input Form Validation
2+
3+
A customized validatorjs library to validate the react forms. This library is extended version of [validatorjs](https://www.npmjs.com/package/validatorjs).
4+
5+
* [Supported Rules](https://www.npmjs.com/package/validatorjs#available-rules) (It is supports all validatorjs)
6+
* [Documentation]()
7+
* [Demo]()
8+
9+
#### Usage
10+
11+
[Click here]() to see the usage and its example
12+
13+
#### Custom attribute name
14+
15+
Refer the below example to override the attribute name
16+
17+
```html
18+
<input
19+
type="text"
20+
name="customer_name"
21+
onBlur={this.form.handleBlurEvent}
22+
onChange={this.form.handleFieldsChange}
23+
value={this.state.fields.customer_name}
24+
data-attribute-name="CUSTOMER NAME"
25+
/>
26+
```
27+
28+
The output will be like, "The CUSTOMER NAME field is required."

package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "react-form-input-validation",
3+
"version": "1.0.0",
4+
"description": "A validator package to validate the react forms",
5+
"main": "./dist/bundle.js",
6+
"license": "MIT",
7+
"author": "gokulakannant <gokulakannanthangaraji@gmail.com>",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/gokulakannant/react-form-input-validation.git"
11+
},
12+
"keywords": [
13+
"react",
14+
"react-validate",
15+
"validatorjs",
16+
"validator.js",
17+
"data validation",
18+
"validator",
19+
"validate",
20+
"validation",
21+
"react form validation",
22+
"react forms",
23+
"material ui form",
24+
"form input validation"
25+
],
26+
"scripts": {
27+
"ts-lint": "tslint -c tslint.json -p tsconfig.json",
28+
"prebuild": "yarn ts-lint",
29+
"build": "webpack",
30+
"postbuild": "yarn generate-docs",
31+
"generate-docs": "typedoc --options ./typedocconfig.ts"
32+
},
33+
"devDependencies": {
34+
"@types/node": "^12.11.7",
35+
"@types/react": "^16.9.11",
36+
"@types/validatorjs": "^3.15.0",
37+
"ts-loader": "^6.2.1",
38+
"tslint": "^6.0.0-beta0",
39+
"typedoc": "^0.15.0",
40+
"typescript": "^3.6.4",
41+
"uglifyjs-webpack-plugin": "^2.2.0",
42+
"webpack": "^4.41.2",
43+
"webpack-cli": "^3.3.9"
44+
},
45+
"dependencies": {
46+
"validatorjs": "^3.17.1"
47+
}
48+
}

0 commit comments

Comments
 (0)