You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
89
89
|**validationOption.name**|**Opt**|**Str**|**To display in the Error message. i.e Please enter your ${name}.**|**""**|
90
90
|**validationOption.check**|**Opt**|**Bool**|**To determin if you need to validate.**|**true**|
91
91
|**validationOption.required**|**Opt**|**Bool**|**To determin if it is a required field.**|**true**|
92
-
|**validationOption.type**|**Opt**|**Str**|**Validation type, options are ['string', 'number'~~, 'phone'~~].**|**"string"**|
92
+
|**validationOption.type**|**Opt**|**Str**|**Validation type, options are ['string', 'number', 'alphanumeric', 'alpha'~~, 'phone'~~].**|**"string"**|
93
93
|**validationOption.numberType**|**Opt**|**Str**|**Validation number type, options are ['decimal', 'int']. Handy when the validation type is number.**|**"decimal"**|
94
94
|**validationOption.showMsg**|**Opt**|**Bool**|**To determin display the error message or not.**|**true**|
95
95
|**validationOption.min**|**Opt**|**Num**|**Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.**|**0**|
// numberType: 'decimal', // Optional.[String].Default: "decimal". Validation number type, options are ['decimal', 'int']. Handy when the validation type is number.
148
148
// showMsg: true, //Optional.[Bool].Default: true. To determin display the error message or not.
149
149
// min: 2, //Optional.[Number].Default: 0. Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.
Copy file name to clipboardExpand all lines: example/index.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ import { Textbox } from 'react-inputs-validation';
78
78
}} // Required.[Func].Default: () => {}. Will return the value.
79
79
onBlur={() => {}} // Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
min: 10, // Optional.[Number].Default: 0. Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.
83
83
max: 100 // Optional.[Number].Default: 0. Validation of max length when validationOption['type'] is string, max amount when validationOption['type'] is number.
84
84
}}
@@ -652,7 +652,7 @@ class Index extends Component {
652
652
console.log(e);
653
653
}}// Optional.[Func].Default: none. In order to validate the value on blur, you MUST provide a function, even if it is an empty function. Missing this, the validation on blur will not work.
654
654
validationOption={{
655
-
type: 'number',// Optional.[String].Default: "string". Validation type, options are ['string', 'number'].
min: 10,// Optional.[Number].Default: 0. Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.
657
657
max: 100,// Optional.[Number].Default: 0. Validation of max length when validationOption['type'] is string, max amount when validationOption['type'] is number.
658
658
}}
@@ -873,7 +873,7 @@ class Index extends Component {
873
873
name: 'Name',// Optional.[String].Default: "". To display in the Error message. i.e Please enter your ${name}.
874
874
check: true,// Optional.[Bool].Default: true. To determin if you need to validate.
875
875
required: true,// Optional.[Bool].Default: true. To determin if it is a required field.
// numberType: 'decimal', // Optional.[String].Default: "decimal". Validation number type, options are ['decimal', 'int']. Handy when the validation type is number.
878
878
// showMsg: true, // Optional.[Bool].Default: true. To determin display the error message or not.
879
879
// min: 2, // Optional.[Number].Default: 0. Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.
@@ -1199,7 +1199,7 @@ class Index extends Component {
1199
1199
name: 'Description',// Optional.[String].Default: "". To display in the Error message. i.e Please enter your ${name}.
1200
1200
check: true,// Optional.[Bool].Default: true. To determin if you need to validate.
1201
1201
required: true,// Optional.[Bool].Default: true. To determin if it is a required field.
1202
-
type: 'string',// Optional.[String].Default: "string". Validation type, options are ['string', 'number'].
// showMsg: true, // Optional.[Bool].Default: true. To determin display the error message or not.
1204
1204
// locale: 'en-US', // Optional.[String].Default: "en-US". For error message display. Current options are ['zh-CN', 'en-US']; Default is 'en-US'.
1205
1205
// min: 2, // Optional.[Number].Default: 0. Validation of min length when validationOption['type'] is string, min amount when validationOption['type'] is number.
0 commit comments