Skip to content

1.0.0-beta.1

Compare
Choose a tag to compare
@logaretm logaretm released this 03 Sep 15:02
· 4510 commits to main since this release

Important Changes:

As mentioned here #10 The required rule was misleading in the previous releases, it implied that the fields that are not required should pass the validation if they had empty values and that is indeed the intended behavior. However that wasn't the case, some fields passed, some didn't depending on how each validates empty values.

This release fixes that behavior. From now on, all fields that do not have the required rule will pass the validation if they have empty values. Those empty values are: null, undefined and ''. if a non-empty value was provided it will proceed to validate them as before.

Bind on nextTick

As described here #9 the Vue 1.x dist wasn't detecting the bound values due to the directive hooks getting called before the DOM update cycle. It is delayed now until the nextTick so your bound values are updated. which is useful if you are creating some sort of a component that validates itself.

Note: This however is only working for initial rendering, the validator still caches the rules and will ignore any changes to the attributes its using data-as and data-rules. so you shouldn't mutate them dynamically.