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
I apologize if the the title doesn't make sense, here is an example of what I am referring to:
I am attempting to validate that a string is of the correct CIDR notation, or of format ip/prefix. Ideally, I would like to be able to use the existing ip() validation since IP validation is complicated (hence, why I am not simply using one custom() validation).
The following code sample works, albeit is a bit verbose.
My question is: would it be possible to validate on something derived from the schema, rather than having to coerce it to a different form and then convert it back? It would be convenient if transform(coerce(derivedSchemaValidations, convert to Derived Schema), convert back to original) could somehow be simplified.
I apologize if I am not making any sense, let me know if you have any questions.
The text was updated successfully, but these errors were encountered:
I apologize if the the title doesn't make sense, here is an example of what I am referring to:
I am attempting to validate that a string is of the correct CIDR notation, or of format
ip/prefix
. Ideally, I would like to be able to use the existingip()
validation since IP validation is complicated (hence, why I am not simply using onecustom()
validation).The following code sample works, albeit is a bit verbose.
My question is: would it be possible to validate on something derived from the schema, rather than having to coerce it to a different form and then convert it back? It would be convenient if
transform(coerce(derivedSchemaValidations, convert to Derived Schema), convert back to original)
could somehow be simplified.I apologize if I am not making any sense, let me know if you have any questions.
The text was updated successfully, but these errors were encountered: