your inputText
value inputText
checked against your <f:validateRegex pattern=" .+@. +\.[a-zA-Z]+" />
, and if its value is invalid, you get an error, so you need to improve the regular expression so that it matched your pattern or took an empty string ...
So wrapping with ()
and adding ?
must complete the task
Try
<f:validateRegex pattern="( .+@. +\.[a-zA-Z]+)?"/>
source share