3.2.0

input validation

What's the AW approved way to perform input validation?
kkeller@ign.com
July 4,
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).
July 4,
What if I do not want validation be performed when, say, I am clicking on a "Cancel" button to close a dialog?
Luca
October 10,

This topic is archived.

See also:


Back to support forum