Hi guys.
I have a question about form validation. My form has a field "username". I
want to check if entered username already exists in database.
I try to use async validator function.
...
var userNameValidator = new qx.ui.form.validation.AsyncValidator(
function(validator, value) {
var userExist = that.db.checkUserExistence(value);
if (userExist) {
var message = "A user with the same name exists in the
database!";
userName.setInvalidMessage(message);
userName.setValid(false);
}else{
userName.setValid(true);
}});
validator.add(userName, userNameValidator);
validator.addListener("complete", function() {
if (validator.getValid()) {
alert('Validation ok!')
}}, this);
But I use userName.setValid(true) an event "validator.complete" doesn't
fire.
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Form-validation-question-tp5161999p5161999.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel