I need to put a mask on a text field in my interface. How is masking on text fields done in SAIL? For example I need to verify that an entry for a MAC address (70:5A:0F:44:3B:12) is correct. Thanks...
Discussion posts and replies are publicly visible
What version of Appian you are on? If you are on Appian version 16.1 or above you can mask the text field with the parameter 'Masked' to be set to true. For verifying the entry you can use parameter 'validations' to check for correct value.
You can try validating the input using the regexmatch function from https://community.appian.com/b/appmarket/posts/regular-expression-functions
In your case this would be:
a!textField( value: ri!addr, saveInto: ri!addr, validations: { if( fn!regexmatch("^([0-9A-F]{2}:){5}[0-9A-F]{2}$", ri!addr), null, "Incorrect format" ) } )
If that is the case you can go with validation of the input as suggested by normanc . To use the regexmatch funtion you need to have this plugin deployed in your environment though.