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. -
validateSingleandvalidateOnChangeare set tofalseby default now. -
Added
submittedproperty, boolean value set totrueafter the initial submit. -
Added shortcut functions for updating and validating fields:
updateValuevalidateValueupdateValueAndValidate
-
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
reValidaitonprop has been renamed torevalidation - Added default if
initialStateis missing. - Renamed
updateValutetoonChangeandpendingtoloadinginrevalidation - Renamed option attribute
instantValidationtovalidateOnChange.