The below code is used to validate the Phone number.
public boolean validateField(FieldId _fieldIdToCheck)
{
boolean ret;
Str phonePattern = @"[0-9]";
System.Text.RegularExpressions.Match myMatch;
ret = super(_fieldIdToCheck);
if (_fieldIdToCheck == fieldNum(PracticeDemo, PhoneMobile))
{
myMatch = System.Text.RegularExpressions.Regex::Match(this.PhoneMobile, phonePattern);
if (strLen(this.PhoneMobile)<10 || strLen(this.PhoneMobile)>10)
{
ret = checkFailed(strFmt("%1 please enter 10 digit mobile number", this.PhoneMobile));
}
if (!myMatch.get_Success())
{
ret = checkFailed(strFmt("%1 is not an valid phone number", this.PhoneMobile));
}
}
return ret;
}
public boolean validateField(FieldId _fieldIdToCheck)
{
boolean ret;
Str phonePattern = @"[0-9]";
System.Text.RegularExpressions.Match myMatch;
ret = super(_fieldIdToCheck);
if (_fieldIdToCheck == fieldNum(PracticeDemo, PhoneMobile))
{
myMatch = System.Text.RegularExpressions.Regex::Match(this.PhoneMobile, phonePattern);
if (strLen(this.PhoneMobile)<10 || strLen(this.PhoneMobile)>10)
{
ret = checkFailed(strFmt("%1 please enter 10 digit mobile number", this.PhoneMobile));
}
if (!myMatch.get_Success())
{
ret = checkFailed(strFmt("%1 is not an valid phone number", this.PhoneMobile));
}
}
return ret;
}
this show error that your form not contain phone mobile method.
ReplyDeleteAn outstanding share! I’ve just forwarded this onto a coworker who was doing a little research on this. And he in fact bought me dinner simply because I stumbled upon it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending some time to discuss this issue here on your web site.
ReplyDeleteEmail Validation Service | Email Validation
This comment has been removed by the author.
ReplyDeleteNice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. Modern Behaviour Pty Ltd
ReplyDelete