Skip to content

Commit 662761c

Browse files
author
Edward Xiao
committed
Merge branch 'master' of github.com:edwardfhsiao/react-inputs-validation
2 parents d8eecbe + 95995ae commit 662761c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
8181
|**onBlur** |**Opt**|**Func**|**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.**|**none** |
8282
|onFocus | Opt | Func | | none |
8383
|onClick | Opt | Func | | none |
84-
|onKeyUp | Opt | Func | | none |
84+
|onKeyUp | Opt | Func | By providing ```onKeyUp```, the component will perform the checking every time when user types. | none |
8585
|**validationOption** |**Opt**|**obj** |**validationOption object, see below**|**{}** |
8686
|**validationOption.name** |**Opt**|**Str** |**To display in the Error message. i.e Please enter your ${name}.**|**""** |
8787
|**validationOption.check** |**Opt**|**Bool**|**To determin if you need to validate.**|**true** |
@@ -97,7 +97,7 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
9797
|**validationOption.regMsg** |**Opt**|**Str** |**Custom regex error message.**|**""** |
9898
|**validationOption.locale** |**Opt**|**Str** |**For error message display. Current options are ['zh-CN', 'en-US']; Default is 'en-US'. If your are looking for more options, you can take a look at '[window.REACT_INPUTS_VALIDATION](#custom-error-message)' section, which provides the extensibility for your own locale.**|**"en-US"** |
9999
|~~**validationOption.phoneCountry**~~|~~**Opt**~~|~~**Str**~~|~~**Useful when the validationOption['type'] is phone. Check if the phone number matchs en-US phone number format.**~~ <br><br>**No longer support after v1.4.0. For phone or email address validation please reffer to '[Phone and email validation example](#phone-email-validation-example)'**|~~**"en-US"**~~|
100-
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
100+
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what(except the message from customFunc) when it has error if it is provied.**|**""** |
101101
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
102102

103103

@@ -144,7 +144,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
144144
// reg: /^\d{18}|\d{15}$/, //Optional.[Bool].Default: "" Custom regex.
145145
// regMsg: 'failed in reg.test(${value})', //Optional.[String].Default: "" Custom regex error message.
146146
// locale: 'en-US', //Optional.[String].Default: "en-US". For error message display. Current options are ['zh-CN', 'en-US']; Default is 'en-US'. If your are looking for more options, you can take a look at 'window.REACT_INPUTS_VALIDATION' section, which provides the extensibility for your own locale.
147-
// msgOnError: "Your custom error message if you provide the validationOption['msgOnError']", //Optional.[String].Default: "" Show your custom error message no matter what when it has error if it is provied.
147+
// msgOnError: "Your custom error message if you provide the validationOption['msgOnError']", //Optional.[String].Default: "" Show your custom error message no matter what(except the message from customFunc) when it has error if it is provied.
148148
// msgOnSuccess: "Your custom success message if you provide the validationOption['msgOnSuccess']. Otherwise, it will not show, not even green border.", //Optional.[String].Default: "". Show your custom success message no matter what when it has error if it is provied.
149149
// customFunc: res => { //Optional.[Func].Default: none. Custom function. Returns true or err message
150150
// if (res != 'milk') {
@@ -449,7 +449,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
449449
|**onBlur** |**Opt**|**Func**|**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.**|**none** |
450450
|onFocus | Opt | Func | | none |
451451
|onClick | Opt | Func | | none |
452-
|onKeyUp | Opt | Func | | none |
452+
|onKeyUp | Opt | Func | By providing ```onKeyUp```, the component will perform the checking every time when user types. | none |
453453
|**validationOption** |**Opt**|**obj** |**validationOption object, see below**|**{}** |
454454
|**validationOption.name** |**Opt**|**Str** |**To display in the Error message. i.e Please enter your ${name}.**|**""** |
455455
|**validationOption.check** |**Opt**|**Bool**|**To determin if you need to validate.**|**true** |
@@ -463,7 +463,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
463463
|**validationOption.reg** |**Opt**|**Bool**|**Custom regex.**|**""** |
464464
|**validationOption.regMsg** |**Opt**|**Str** |**Custom regex error message.**|**""** |
465465
|**validationOption.locale** |**Opt**|**Str** |**For error message display. Current options are ['zh-CN', 'en-US']; Default is 'en-US'. If your are looking for more options, you can take a look at '[window.REACT_INPUTS_VALIDATION](#custom-error-message)' section, which provides the extensibility for your own locale.**|**"en-US"** |
466-
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
466+
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what(except the message from customFunc) when it has error if it is provied.**|**""** |
467467
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
468468
469469
```js
@@ -510,7 +510,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
510510
// length: 2, //Optional.[Number].Default: 0. Validation of exact length of the value.
511511
// reg: /^\d{18}|\d{15}$/, //Optional.[Bool].Default: "". Custom regex.
512512
// regMsg: 'failed in reg.test(${value})', //Optional.[String].Default: "". Custom regex error message.
513-
// msgOnError: "Your custom error message if you provide the validationOption['msgOnError']", //Optional.[String].Default: "". Show your custom error message no matter what when it has error if it is provied.
513+
// msgOnError: "Your custom error message if you provide the validationOption['msgOnError']", //Optional.[String].Default: "". Show your custom error message no matter what(except the message from customFunc) when it has error if it is provied.
514514
// msgOnSuccess: "Your custom success message if you provide the validationOption['msgOnSuccess']. Otherwise, it will not show, not even green border.", //Optional.[String].Default: "". Show your custom success message no matter what when it has error if it is provied.
515515
// customFunc: res => { //Optional.[Func].Default: none. Custom function. Returns true or err message
516516
// if (res != 'banana') {

0 commit comments

Comments
 (0)