laminas / laminas-form

Validate and display simple and complex forms, casting forms to business objects and vice versa
https://docs.laminas.dev/laminas-form/
BSD 3-Clause "New" or "Revised" License
80 stars 52 forks source link

Email element default validator error message is unhelpful #43

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

The RegexValidator created by Email->getEmailValidator should be given a message similar to the EmailAddress validator, rather than the obnoxious dump of the pattern.

Related: zendframework/zend-validator#41


Originally posted by @AndrolGenhald at https://github.com/zendframework/zend-form/issues/84

kronthto commented 1 year ago

The EmailAddress validator also handles IDN hostnames, while the regex here blocks them. A comment says that the regex is to match HTML spec behavior - either Firefox and Chrome allow IDN hostnames though.