Back
validateOnUpdate()
Registers method(s) that should be called to validate existing objects before they are updated.
function config(){
// Register the `check` method below to be called to validate existing objects before they are updated.
validateOnUpdate("checkPhoneNumber");
}
function checkPhoneNumber(){
// Make sure area code is `614`
return Left(this.phoneNumber, 3) == "614";
}
Copied!