RFC: Custom Controller Validation (draft) #15
matthewmueller
announced in
Proposals
Replies: 2 comments
-
There's an existing discussion about using validator here: #171 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This would be a good solution I think. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For more complex validation, you can define a
Valid
method on an input type:If validation fails, you get a 400 Bad Request response with your error message:
Validation also works with other input types:
If validation fails, you get a
400 Bad Request
response. Since email is a key within the request map, we can provide more information in the error message:Open Questions
Validate
vsValid
? IMOValidate
sounds more like an action that would return an error, butValid
is shorter.Beta Was this translation helpful? Give feedback.
All reactions