Skip to content

Commit c18b44b

Browse files
author
Edward Xiao
authored
Update README.md
1 parent b0812d5 commit c18b44b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
2929
* <a href="https://codesandbox.io/s/custom-function-further-control-when-providing-customfunc-yjwch">Custom function further control</a>(when providing ```customFunc```)
3030
* <a href="https://codesandbox.io/s/q9vqmk4j84">Example of custom locales</a>(when providing ```window.REACT_INPUTS_VALIDATION['customErrorMessage']```)
3131
* <a href="https://codesandbox.io/s/13qo2rqxjj">Example of phone and email validation</a>(handled with ```customFunc```)
32-
* <a href="https://codesandbox.io/s/async-checking-via-customfunc-emqgw">Example of checking username existence (suggest not using asyncMsgObj. And it is for ```<Textbox>``` and ```<Textarea>``` only) </a>(handled with ```customFunc```)
32+
* <a href="https://codesandbox.io/s/async-checking-via-customfunc-emqgw">Example of async checking username existence </a>(Async checking for ```<Textbox>``` and ```<Textarea>``` only. Handled with ```customFunc```)
3333
* <a href="https://codesandbox.io/s/asyncmsgobj-blmce">Example of asyncMsgObj </a>(when providing ```asyncMsgObj```)
3434

3535
# Docs Link
@@ -45,7 +45,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
4545

4646
[Custom Error Message Guid(can be multiple locales)](#custom-error-message)
4747

48-
[Phone and email validation example](#phone-email-validation-example)(Since the phone and email validation are no longer handled internally after v1.4.0.)
48+
[Example of phone and email validation](#phone-email-validation-example)(Since the phone and email validation are no longer handled internally after v1.4.0.)
4949

5050
# Installation
5151
```sh
@@ -99,11 +99,11 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
9999
|**validationOption.reg** |**Opt**|**Bool**|**Custom regex.**|**""** |
100100
|**validationOption.regMsg** |**Opt**|**Str** |**Custom regex error message.**|**""** |
101101
|**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"** |
102-
|~~**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"**~~|
102+
|~~**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 '[Example of phone and email validation](#phone-email-validation-example)'**|~~**"en-US"**~~|
103103
|**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.**|**""** |
104104
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
105105
|**asyncMsgObj.error** |**Opt**|**Bool** |**(Server response) Backend validation result.**|**false** |
106-
|**asyncMsgObj.message** |**Opt**|**Str** |**(Server response) Your AJAX message. For instance, provide it when backend returns 'USERNAME ALREADY EXIST'**|**""** |
106+
|**asyncMsgObj.message** |**Opt**|**Str** |**(Server response) Your AJAX message. For instance, provide it when backend returns 'USERNAME ALREADY EXIST' (For Textbox or Textarea, better reffer to <a href="https://codesandbox.io/s/async-checking-via-customfunc-emqgw">Example of async checking username existence </a>**|**""** |
107107
|**asyncMsgObj.showOnError** |**Opt**|**Bool** |**(Server response) Show AJAX error message or not.**|**true** |
108108
|**asyncMsgObj.showOnSuccess** |**Opt**|**Bool** |**(Server response) Show AJAX success message or not.**|**false** |
109109

@@ -507,7 +507,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
507507
|**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.**|**""** |
508508
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
509509
|**asyncMsgObj.error** |**Opt**|**Bool** |**(Server response) Backend validation result.**|**false** |
510-
|**asyncMsgObj.message** |**Opt**|**Str** |**(Server response) Your AJAX message. For instance, provide it when backend returns 'USERNAME ALREADY EXIST'**|**""** |
510+
|**asyncMsgObj.message** |**Opt**|**Str** |**(Server response) Your AJAX message. For instance, provide it when backend returns 'USERNAME ALREADY EXIST' (For Textbox or Textarea, better reffer to <a href="https://codesandbox.io/s/async-checking-via-customfunc-emqgw">Example of async checking username existence </a>**|**""** |
511511
|**asyncMsgObj.showOnError** |**Opt**|**Bool** |**(Server response) Show AJAX error message or not.**|**true** |
512512
|**asyncMsgObj.showOnSuccess** |**Opt**|**Bool** |**(Server response) Show AJAX success message or not.**|**false** |
513513
@@ -573,7 +573,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
573573
/>
574574
```
575575
576-
### <a name="phone-email-validation-example"></a>Phone and email validation example
576+
### <a name="phone-email-validation-example"></a>Example of phone and email validation
577577
<a href="https://codesandbox.io/s/13qo2rqxjj">codesandbox example</a>
578578
```js
579579
import validator from 'validator';
@@ -595,7 +595,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
595595
}
596596
}}
597597
/>
598-
598+
599599
// Email
600600
<Textbox
601601
...

0 commit comments

Comments
 (0)