public boolean validateField(FieldId _fieldIdToCheck)
{
boolean ret;
ret = super(_fieldIdToCheck);
if(ret)
{
switch(_fieldIdToCheck)
{ //if the field is Phone Mobile
case fieldNum(BanckCustomersTable, PhoneMobile):
if(strLen(this.PhoneMobile)<10)
{
Box::info("Please Enter 10 Digit Mobile Number");
return false;
}
else
{ //validatePhoneNumber mothod will returb true if the mobile number is correct else returns false
ret =this.validatePhoneNumber(this.PhoneMobile);
if(ret==false)
{
Box::info("Please Enter Valid Phone Number");
}
}
break;
case fieldNum(BanckCustomersTable, Email):
//validateEMail mothod will returb true if the mobile number is correct else returns false
ret = this.validateEMail(this.Email);
if(ret==false)
{
Box::info("Please Enter a valid E-Mail Id");
}
break;
}
}
return ret;
}
No comments:
Post a Comment