You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe in the constructor all the fields, that you will check. Like in the [example](#form-example).
161
161
By default all validation data will be added to the 'validationStorage' key of the state object. You can change it, if you need. You can describe for each field [1 or many rules](#creating-validation-rules).
162
162
@@ -228,7 +228,11 @@ this.setState(
228
228
Use this method inside the render function, like in the [example](#form-example). It will return the object with fields keys and their error messages. If the field is valid there will be an empty error string.
229
229
230
230
### isFormValid({state})
231
-
Use this method to check, if the field is valid. It will return true, if all the fields in the form are valid. See the [example](#form-example)
231
+
Use this method to check, if the form is valid. It will return true, if all the fields in the form are valid. See the [example](#form-example)
232
+
233
+
### isFieldValid({state}, fieldName)
234
+
Use this method to check, if particular field is valid. Returns true if it is valid, false otherwise
235
+
232
236
233
237
## Compatibility
234
238
This package id fully compatible with the React v.16, because it uses state updater functions inside.
0 commit comments