Form Level Custom Validation Rule

Although, validation rules should be implemented in the model, sometimes we need to validate a few rules in the UI as well. M# allows you to write custom code in Form module events e.g. on loading, before saving a record etc. You can write any custom validation rule, which requires input control references or very specific to UI elements. “Module Custom Code” explains more details on available events to write custom code.

You can also perform custom validation rule on button actions. For example, you can display a message box if the password doesn’t match on the “Login Form” as shown below