Hello I want to apply validation for mobile number and email in activity section. For example, the phone number should be of 10 digits and only contain numbers and email format should be of the form abc@xyz.com.
I have used JavaScript for lead section to do it for the web version but how to do it for the mobile application?
Below is the screenshot of the mobile activity page where I want to apply this validation.
For using the custom rule for validation, you can pass a third parameter to the callback function with a message (the validation message) and value (true or false indicating if validation passed or not).
For example:
var result ={};if(passedTheTestAndIsValid){
result ={
value:true};}else{
result ={
value:false,
message:"The entered value is invalid"}}// now include the result in the callback
Ext.callback(callbackConfig.success, callbackConfig.scope, [result]);