JScript for Text Validations in CRM 2011
The above Snippet code can be used for validation of text field in CRM 2011.
function textValidation(context)
{
var text =context.getEventSource().getValue();
var re=new RegExp("[^a-zA-Z ]"); /// here after a-zA-Z " "is included to show that all that it must also include
// the "Space" in between letters, we can include 0-9 to accept numbers also
if(re.test(text))
{
alert("Alphabets only");
}
}
No comments:
Post a Comment