Skip to content

Commit f3d1bfa

Browse files
Update README.md
1 parent 02e3d40 commit f3d1bfa

1 file changed

Lines changed: 41 additions & 24 deletions

File tree

README.md

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,22 @@
2929

3030
Then Integrate your form with Validator.
3131

32-
3332
```javascript
34-
35-
// For Native-Javascript
36-
var myform = jsValidator.init({
33+
34+
// Core
35+
var myform = jsValidator.init({
3736
form: 'form2submit', // #id
38-
forceFilter: true,
39-
message: {
40-
required: 'This field is required !',
41-
min: '<br><span style="color: red;">This field is less then the limit [INDEX]</span>',
42-
max: 'This field is exceeds the limit of [INDEX]',
43-
password: 'Password doesn\'t match !',
44-
email: 'Invalid Email found !'
45-
}
4637
});
4738

48-
// For ES6
49-
var myform = new jsValidator().init({
39+
// ES6
40+
var myform = new jsValidator().init({
5041
form: 'form2submit', // #id
51-
forceFilter: true,
52-
message: {
53-
required: 'This field is required !',
54-
min: '<br><span style="color: red;">This field is less then the limit [INDEX]</span>',
55-
max: 'This field is exceeds the limit of [INDEX]',
56-
password: 'Password doesn\'t match !',
57-
email: 'Invalid Email found !'
58-
}
5942
});
60-
43+
6144
```
45+
46+
47+
6248
## Options
6349

6450
| Name | Values | Descriptions | Mandatory |
@@ -101,7 +87,7 @@ Then Integrate your form with Validator.
10187
10288
Currently the validation will trigger on submit button trigger.
10389

104-
It has automated listener to eliminating unnecessary changes on form.
90+
It has automated listener to monitor every changes on form.
10591

10692
**Note:**
10793

@@ -189,6 +175,37 @@ It has automated listener to eliminating unnecessary changes on form.
189175
</form>
190176
```
191177

178+
#### Sample
179+
180+
```javascript
181+
182+
// For Native-Javascript
183+
var myform = jsValidator.init({
184+
form: 'form2submit', // #id
185+
forceFilter: true,
186+
message: {
187+
required: 'This field is required !',
188+
min: '<br><span style="color: red;">This field is less then the limit [INDEX]</span>',
189+
max: 'This field is exceeds the limit of [INDEX]',
190+
password: 'Password doesn\'t match !',
191+
email: 'Invalid Email found !'
192+
}
193+
});
194+
195+
// For ES6
196+
var myform = new jsValidator().init({
197+
form: 'form2submit', // #id
198+
forceFilter: true,
199+
message: {
200+
required: 'This field is required !',
201+
min: '<br><span style="color: red;">This field is less then the limit [INDEX]</span>',
202+
max: 'This field is exceeds the limit of [INDEX]',
203+
password: 'Password doesn\'t match !',
204+
email: 'Invalid Email found !'
205+
}
206+
});
207+
208+
```
192209
193210
It Will listen the **Submit** button event **Automatically**.
194211

0 commit comments

Comments
 (0)