Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Releases: Albert-Gao/veasy

Update the onlyWhen rule

07 May 12:15
Compare
Choose a tag to compare

Now if a field contains onlyWhen, its validation will be triggered even not from its own event. This is to ensure the isFormOK always get the correct value.

Add `onlyWhen` rule

06 May 08:56
Compare
Choose a tag to compare

The onlyWhen has a same syntax as reliesOn, the only difference is, if the validation in onlyWhen not pass, this field will be ruled out from validation even its value is wrong.

New features

27 Apr 05:10
Compare
Choose a tag to compare

When you use reliesOn, you can even refer some field that is not controlled by veasy. As long as you included that field in the collectValues schema. Veasy could find it.

Thanks @JeremyColton for the idea!

Add `reliesOn` rule

25 Apr 09:05
Compare
Choose a tag to compare

Now support reliesOn rule.

  • field A can reliesOn field B with different rules
  • field B, of course, can have its own validation rules
  • no conflicts
  • More in the documentation

Thanks @JeremyColton for the idea!

Fix

16 Apr 11:50
Compare
Choose a tag to compare
Fix

[Fix] Now the default value will trigger the validation when invoking createInitialState()

Thanks @JeremyColton For the help

Improve

08 Mar 11:50
Compare
Choose a tag to compare
  1. Add a new rule of: beforeValidation which is a function where it will get executed before validation starts. It will allow you to modify the value.
  2. Fix a bug where Veasy will throw an exception when the user wraps a non-form field component.

Thanks @JeremyColton For the help

Bug fix

12 Dec 03:30
Compare
Choose a tag to compare

Now the custom message will work when building production.

Now the checkIsFormOK will be invoked when generating the initial state

06 Dec 12:41
Compare
Choose a tag to compare

Bug fix

06 Dec 09:48
Compare
Choose a tag to compare

Now when you have a default in your schema, even the status is normal, as long as the field's value equals default. The isFormOK will set to OK.

Related to #17
Thanks @JeremyColton

Add a new parameter to validate()

03 Nov 10:46
Compare
Choose a tag to compare

Now it accepts an optional 5th parameter where you can use to specify targetName