I am not sure if it will work perfectly fine but would look into the repository definition on your field. In there you should see a picture clause attribute where you can configure a formatting clause.
If the picture clause is omitted, the login locale’s parameters will be used. Otherwise see the API documentation of the Java Development Kit
- Decimals: java.text.DecimalFormat
- Strings: javax.swing.text.MaskFormatter
- Dates: java.text.SimpleDateFormat (Please consider special week year syntax introduced with Java 7)
- Others: See the corresponding formater implementation which is contributed to the FormatUtils of Product 360.
I am not sure if you will be able to implement a true email validation with that though...
1 of 1 people found this helpful
I doubt that the picture clause will work for your use case as the used java MaskFormatter is on a per character basis, it's not like a regular expression.
You would need to contribute a PropertyValidator for your field using the P360 SDK. The PropertyValidator has all the power of the SDK of course. In the contribution you can provide for which field you want this validator to be executed.
Inside of the validator you can specify a command feedback which will be shown to the user or in the protocol view in case of a job.
Have a look at the SDK documentation for the command framework and the SDK examples.
Thank you Andreas. Will try this and update here.