You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: global and local rules can be combined on same field (#5025)
When both global rules (via defineRule) and local/inline validator
functions are used on the same field, they can now be combined using
either the object syntax or the array syntax.
Object syntax: { required: true, myLocalRule: myValidatorFn }
Array syntax: ['required', myValidatorFn]
Previously, the object syntax would throw "No such validator" because
function values were treated as rule parameters rather than inline
validators. The array syntax would throw "rule is not a function"
because string entries were called directly instead of being resolved
as global rules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments