Skip to content

Commit ef53fc2

Browse files
Update README.md
1 parent cf9a6ff commit ef53fc2

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,21 @@
1818

1919
**Steps to Integrate to Form :**
2020

21-
``<script src="./../src/js/formValidator.js"></script>``
21+
<script src="./../src/js/formValidator.js"></script>
2222

2323
Then Integrate your form with Validator.
2424

25-
<script>
26-
27-
/.../
28-
29-
var data = {
30-
form: 'new_ticket_form', // Required.
31-
warning_color: 'aa0000', // Optional.
32-
new_class: 'test' // Optional.
33-
};
34-
35-
// Validation Will Init Here.
36-
validate(data);
37-
38-
/.../
3925
40-
</script>
26+
```
27+
var data = {
28+
form: 'new_ticket_form', // Required.
29+
warning_color: 'aa0000', // Optional.
30+
new_class: 'test' // Optional.
31+
};
32+
33+
// Validation Will Init Here.
34+
validate(data);
35+
```
4136
4237
4338
Currently the validation will trigger on submit button trigger.
@@ -49,9 +44,11 @@ It has automated listener to eliminating unnecessary changes on form.
4944
1. Validation take place between tags, so need to specify the **ID**
5045
of the Form or any other tags.
5146

52-
<form id="newUser"> </form> // Preferred
47+
```
48+
<form id="newUser"> </form> // Preferred
5349
54-
<div id=newUser> </div> // Not-Preferred [but it supports]
50+
<div id=newUser> </div> // Not-Preferred [but it supports]
51+
```
5552
5653
2. Input Fields should specify the type of validation.
5754

0 commit comments

Comments
 (0)