-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Review of api/validators #62659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: prototype/signal-forms
Are you sure you want to change the base?
Review of api/validators #62659
Conversation
f80ee5a
to
22b7174
Compare
Improves the ergonomics of the `errors` option offered by the standard validators. 1. Renames it to `error` because in the majority of cases it will be used to return a single `ValidationError`. 2. Allows directly using a constant `ValidationError` insetad of having to create a function like `() => ValidationError.custom()`
f04b1ed
to
ed163e7
Compare
5599dfb
to
9f2fb96
Compare
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request focuses on refactoring the forms validators API to enhance consistency and reactivity. Key changes include renaming minlength
/maxlength
to camelCase, standardizing validator configuration with an error
property, and updating most validators to use a more reactive implementation with define
and computed
. The JSDoc and test suites have also been updated accordingly.
9f2fb96
to
63929b2
Compare
See individual commits which address the TODOs I initially commented