Skip to content

Commit b9c73ca

Browse files
Merge pull request #33 from global-source/master
Readme Updated
2 parents 03f6d3c + b5d6ad4 commit b9c73ca

1 file changed

Lines changed: 46 additions & 27 deletions

File tree

README.md

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
git checkout master
1212

13-
## What's New ?
13+
## Why this ?
1414

1515
* Support **Native** and **ES6** Javascript,
1616
* Pure Javascript Code (**No Dependency**),
1717
* Simplified Implementations,
1818
* **HTML 5 validation** for all Browsers,
19-
* Reliable and **Dynamic** level **DOM** Validations.
19+
* Reliable and **Dynamic** level **DOM** Validations,
20+
* Dynamic auto scroll with element.
2021

2122

2223
**Steps to Integrate to Form :**
@@ -29,36 +30,22 @@
2930

3031
Then Integrate your form with Validator.
3132

32-
3333
```javascript
34-
35-
// For Native-Javascript
36-
var myform = jsValidator.init({
34+
35+
// Core
36+
var myform = jsValidator.init({
3737
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-
}
4638
});
4739

48-
// For ES6
49-
var myform = new jsValidator().init({
40+
// ES6
41+
var myform = new jsValidator().init({
5042
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-
}
5943
});
60-
44+
6145
```
46+
47+
48+
6249
## Options
6350

6451
| Name | Values | Descriptions | Mandatory |
@@ -101,7 +88,7 @@ Then Integrate your form with Validator.
10188
10289
Currently the validation will trigger on submit button trigger.
10390

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

10693
**Note:**
10794

@@ -189,8 +176,40 @@ It has automated listener to eliminating unnecessary changes on form.
189176
</form>
190177
```
191178

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

195214

196215
License

0 commit comments

Comments
 (0)