Skip to content

Commit 148c6ec

Browse files
author
Edward Xiao
committed
Merge branch 'master' of github.com:edwardfhsiao/react-inputs-validation
2 parents b93afec + a2e31e4 commit 148c6ec

File tree

4 files changed

+66
-7
lines changed

4 files changed

+66
-7
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '....'
14+
3. Scroll down to '....'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Smartphone (please complete the following information):**
29+
- Device: [e.g. iPhone6]
30+
- OS: [e.g. iOS8.1]
31+
- Browser [e.g. stock browser, safari]
32+
- Version [e.g. 22]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Question request
3+
about: Ask your question here
4+
5+
---
6+
7+

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
3131

3232
[Textarea](#Textarea)
3333

34-
[Custom Error Message Guid(can be multiple locales)](#CustomErrorMessage)
34+
[Custom Error Message Guid(can be multiple locales)](#custom-error-message)
3535

3636
[Phone and email validation example](#phone-email-validation-example)(Since the phone and email validation are no longer handled internally after v1.4.0.)
3737

@@ -85,7 +85,7 @@ Tested on IE9+ and Chrome and Safari(10.0.3)
8585
|**<a name="customFunc"></a>validationOption.customFunc** |**Opt**|**Func**|**Custom function. Returns true or err message.**| **none** |
8686
|**validationOption.reg** |**Opt**|**Bool**|**Custom regex.**|**""** |
8787
|**validationOption.regMsg** |**Opt**|**Str** |**Custom regex error message.**|**""** |
88-
|**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](#CustomErrorMessage)' section, which provides the extensibility for your own locale.**|**"en-US"** |
88+
|**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"** |
8989
|~~**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"**~~|
9090
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
9191
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
@@ -177,7 +177,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
177177
|**validationOption.check** |**Opt**|**Bool**|**To determin if you need to validate.**|**true** |
178178
|**validationOption.required** |**Opt**|**Bool**|**To determin if it is a required field.**|**true** |
179179
|**validationOption.showMsg** |**Opt**|**Bool**|**To determin display the error message or not.**|**true** |
180-
|**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](#CustomErrorMessage)' section, which provides the extensibility for your own locale.**|**"en-US"** |
180+
|**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"** |
181181
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
182182
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
183183

@@ -259,7 +259,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
259259
|**validationOption.check** |**Opt**|**Bool**|**To determin if you need to validate.**|**true** |
260260
|**validationOption.required** |**Opt**|**Bool**|**To determin if it is a required field.**|**true** |
261261
|**validationOption.showMsg** |**Opt**|**Bool**|**To determin display the error message or not.**|**true** |
262-
|**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](#CustomErrorMessage)' section, which provides the extensibility for your own locale.**|**"en-US"** |
262+
|**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"** |
263263
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
264264
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
265265
```js
@@ -346,7 +346,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
346346
|**validationOption.check** |**Opt**|**Bool**|**To determin if you need to validate.**|**true** |
347347
|**validationOption.required** |**Opt**|**Bool**|**To determin if it is a required field.**|**true** |
348348
|**validationOption.showMsg** |**Opt**|**Bool**|**To determin display the error message or not.**|**true** |
349-
|**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](#CustomErrorMessage)' section, which provides the extensibility for your own locale.**|**"en-US"** |
349+
|**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"** |
350350
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
351351
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
352352
@@ -452,7 +452,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
452452
|**validationOption.customFunc** |**Opt**|**Func**|**Custom function. Returns true or err message.**| **none** |
453453
|**validationOption.reg** |**Opt**|**Bool**|**Custom regex.**|**""** |
454454
|**validationOption.regMsg** |**Opt**|**Str** |**Custom regex error message.**|**""** |
455-
|**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](#CustomErrorMessage)' section, which provides the extensibility for your own locale.**|**"en-US"** |
455+
|**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"** |
456456
|**validationOption.msgOnError** |**Opt**|**Str** |**Show your custom error message no matter what when it has error if it is provied.**|**""** |
457457
|**validationOption.msgOnSuccess** |**Opt**|**Str** |**Show your custom success message no matter what when it has error if it is provied.**|**""** |
458458
@@ -552,7 +552,7 @@ import 'react-inputs-validation/lib/react-inputs-validation.min.css';
552552
/>
553553
```
554554
555-
### <a name="CustomErrorMessage"></a>Custom Error Message (can be multiple locales)
555+
### <a name="custom-error-message"></a>Custom Error Message (can be multiple locales)
556556
By providing ```window.REACT_INPUTS_VALIDATION['customErrorMessage']```, you can overwrite the error message.
557557
558558
**IMPORTANT NOTE: YOU WILL NEED TO PLACE window.REACT_INPUTS_VALIDATION BEFORE YOUR JS SCRIPT**

0 commit comments

Comments
 (0)