Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

ms crm aadhar number validation javascript

function validateCity1(executionContext) {
   var formContext = typeof executionContext != 'undefined' ? executionContext.getFormContext() : Xrm.Page; // get formContext
   
   var pattern = /[^a-z]/ig;
   var fieldName = 'address1_city';
   var currentValue = formContext.getAttribute(fieldName).getValue(); 
   if (pattern.test(currentValue)) {
     formContext.getControl(fieldName).setNotification('Invalid value, please enter only letters.');
   } else {
     formContext.getControl(fieldName).clearNotification();
   }

}
Source by community.dynamics.com #
 
PREVIOUS NEXT
Tagged: #ms #crm #aadhar #number #validation #javascript
ADD COMMENT
Topic
Name
9+2 =