Skip to content
This repository was archived by the owner on Nov 10, 2018. It is now read-only.

Commit 20b1e88

Browse files
committed
updated readme and package.yml for new feature
1 parent 18c44ee commit 20b1e88

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ ValidateSimple Method: constructor
9191
#### Options
9292

9393
* active - (boolean: defaults to true) Doesn't attach events until activated.
94+
* validateOnSubmit - (boolean: defaults to true) validate all inputs on submit and fire events (see below).
9495
* inputSelector - (mixed: defaults to 'input') CSS Selector or input elements.
9596
* invalidClass - (string: defaults to 'invalid') class to add for invalid inputs.
9697
* validClass - (string: defaults to 'valid') class to add for valid inputs.
@@ -111,6 +112,10 @@ ValidateSimple Method: constructor
111112
* touched - When form has been edited.
112113
* valid - When form is valid.
113114
* invalid - When form is invalid.
115+
* invalidSubmit - (Only when validateOnSubmit is true) When form is submitted and invalid.
116+
Arguments: this instance and the submit event.
117+
* validSubmit - (Only when validateOnSubmit is true) When form is submitted and valid.
118+
Arguments: this instance and the submit event.
114119

115120

116121
ValidateSimple Method: activate
@@ -132,3 +137,13 @@ Deactivates the instance of ValidateSimple (detaches events and sill start firin
132137

133138
vs.deactivate();
134139

140+
141+
ValidateSimple Method: validateAllInputs
142+
---------------------------------
143+
144+
Validates all inputs and returns true for a valid form, false for an invalid form.
145+
146+
#### Syntax
147+
148+
vs.validateAllInputs();
149+

package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Simple form validation with good UX"
44
category: "Forms"
55
tags:
66
- "validation"
7-
current: "0.1"
7+
current: "0.2"
88
author: "3n"
99
1010
website: "http://www.iancollins.me"

0 commit comments

Comments
 (0)