Releases: busypeoples/revalidation
Releases · busypeoples/revalidation
v0.12.0
v0.11.0
Following Changes:
-
validateOnChange
: accepts a callback or a boolean value. Useful when needing from static to dynamic validation after an initial submit. -
validateSingle
andvalidateOnChange
are set tofalse
by default now. -
Added
submitted
property, boolean value set totrue
after the initial submit. -
Added shortcut functions for updating and validating fields:
updateValue
validateValue
updateValueAndValidate
-
Changed asynchronous validation handling. Revalidation doesn't run any asynchronous validations against rules, this has been moved to user land.
-
onSubmit
(renamed fromvalidateAll
) now runs any callback supplied wether the validation has been successful or not. Passes a calculatedvalid
(boolean) and the complete form state.<button onClick={() => onSubmit(({form, valid}) => valid ? submitCb(form) : console.log('not valid!'))} > Submit </button>
v0.10.0
Following Changes:
- Added Deep Nested Data capabilities: Enables to update and validate deep nested data.
- The
reValidaiton
prop has been renamed torevalidation
- Added default if
initialState
is missing. - Renamed
updateValute
toonChange
andpending
toloading
inrevalidation
- Renamed option attribute
instantValidation
tovalidateOnChange.