:: Forum >>

input validation

What's the AW approved way to perform input validation?
kkeller@ign.com
Tuesday, July 4, 2006
var input = new AW.UI.Input;
input.setId("inputA01"); // whatever
input.onControlValidating = function(txt) {
// txt its a number?
if( !(Number(txt)>0) ) return "error"; // return non-0 value to denied
}
input.onControlValidated = function() {
alert('Control Validated, value: '+this.getControlText());
}

hope this help, cya.
Paulo Cesar Silva Reis (PC from Brazil).
Tuesday, July 4, 2006
What if I do not want validation be performed when, say, I am clicking on a "Cancel" button to close a dialog?
Luca
Tuesday, October 10, 2006

This topic is archived.


Back to support forum

Forum search