M# Tutorials

Learn to build .NET applications with M#. Our step-by-step tutorials will get you up-to-speed rapidly.
If you already know ASP.NET and C#, you can master M# in a week or two.

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