Skip to content

Form::isValid() returning true despite invalid EmailType value #44055

Answered by welcoMattic
php4fan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @php4fan, I think you are confusing 2 things which are separated in Symfony :
FormTypes and Constraints.

Actually EmailType has no default Constraint for email validation. If you want that, you have to add yourself an Email constraint on your EmailType.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by php4fan
Comment options

You must be logged in to vote
1 reply
@stof
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants