v2.5.0
Release Description
-
Added validation dependencies by declaring validation as an object with
rules
anddeps
properties, whererules
specify any acceptable validation rules, anddeps
is an array of dependency input names. For example:function ItemForm() { const {$} = useForm({}, { min: ["presence", "numericality"], max: { rules: [ "presence", "numericality", function(value, {attrs}) { if (value <= attrs.min) { return "Should be greated than 'min'"; } } ], deps: ["min"] } }) }
Wildcards are also supported as dependencies (more details in README)
-
Initial config resolution is now memoized to get rid of redundant resolutions on each render.