tom2....@gmail.com
unread,Apr 17, 2015, 12:45:39 AM4/17/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to codenameone...@googlegroups.com
I use the new validation package in my app and implemented it like this:
// add validation
Validator.setValidateOnEveryKey(true);
val = new Validator();
val.addConstraint(tfFontSize, new NumericRangeConstraint(6, 100, fnLocalize("errNumericNotInRange")));
val.addSubmitButtons(btnSave);
I also defined the ...Invalid UIID for the TextField.
When I enter an invalid value, the TextField is highlighted and the btnSave is disabled, which is OK.
When I then correct the value, the TextField is not highlighted anymore, but the btnSave does not get enabled again!
Also, the highlighting only occurs when I leave the field, although the validation is done on every key press (I saw that in the Log output I added to the isValid method of my Constraint). Shouldn't the highlighting be done on every key press?
Tom