This content has been marked as final.
Show 2 replies
-
1. Re: rich:beanValidator issue
ilya_shaikovsky Oct 13, 2008 5:56 AM (in response to stenlylee)submitted value in this case is "" but not null.. So length validator in isValid
public boolean isValid(Object value) { if ( value == null ) return true; if ( !( value instanceof String ) ) return false; String string = (String) value; int length = string.length(); return length >= min && length <= max; }
just validate its length and so throws the message. -
2. Re: rich:beanValidator issue
stenlylee Oct 13, 2008 6:06 AM (in response to stenlylee)so... it can be consider as a bug?
because if the value is not requried and it has the length rules, I can't use the beanValidator here