Skip to content
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

How to make such a type that the field is either absent at all or is a number #330

Open
AD2018 opened this issue Jul 4, 2023 · 2 comments

Comments

@AD2018
Copy link

AD2018 commented Jul 4, 2023

How to make such a type that the field is either absent at all or is a number, i tried it:
image

But as you see from console.log it doesnt work, because null is ok for validator(same for undefined)
It will be ok if someone tells me how to make the null value not allowed, undefining is acceptable for me

@fernandodevelon
Copy link

I think that using a custom you can solve the problem

@AD2018
Copy link
Author

AD2018 commented Jul 7, 2023

I will try soon, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants