[hibernate-dev] [BV] Though about PatternValidator

Alaa Mohsen alaa.mohsen at egyptdc.com
Wed Jun 24 03:47:56 EDT 2009

Hello All,
     I just realized that PatternValidator checks if the String passed to it
is null or not before checking it's validity, but it doesn't check if the
String is empty. What if someone wants to put a regular expression
constraint on a non mandatory field, and the framework he uses sets this
empty field to an empty string? What do you think?

Alaa Nassef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20090624/d4fc8df9/attachment.html 

More information about the hibernate-dev mailing list