-
Notifications
You must be signed in to change notification settings - Fork 26.3k
The rest of the built-in validators #61758
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
Conversation
* @param path Path to the target field | ||
* @param config Optional, currently allows providing custom errors function. | ||
*/ | ||
export function requiredTrue(path: FieldPath<boolean>, config?: BaseValidatorConfig<boolean>) { |
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.
do we need this? this just feels like it should be required
with a FieldPath<boolean>
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.
Keeping for now
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.
I've been looking at signal forms and it is pretty interesting so far. Noticed this comment, and maybe you already know this, but the requiredTrue is mainly useful for checkboxes, where you might require a checkbox to be checked. A required validator for a checkbox would allow a false value, but not undefined/null.
No description provided.