Validation Rule Template extension. Create rules for your Xamarin and Windows properties in the easiest way.

This extension enables developers to add an empty template validation rule for Plugin.ValidationRules. The Template contains an empty rule class that has the implementation of IValidationRule.

Improve the quality of your data using validation rules. Validation rules verify that the data the user enters into record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value “False” due to an invalid value.

See more here.

Validation Rule Template – Set up

To install Validation Rule Template extension forVisual Studio we can proceed in 3 simple steps:

  1. In Visual Studio Tools menu,  select Extensions and Updates….
  2. Be sure you are in Online section.
  3. In the Search bar, type Validation Rule Template and Download the extension for your Visual Studio intance.
    search and install validation rule template

Reminder: Once you have downloaded the extension reset your Visual Studio intance.

How to use it

  1. In Solution Explorer, right click on the project or folder you want the empty rule and select Add > New Item…
  2. In Visual C# Items, select Rule, type your rule name and add it to your project or folder.
  3. Once you have added, your rule file will look like this.


Thank you somuch for reading this post! 



I invite you to leave me your feedback about this post in the comment box. If you want me to talk about a specific topic or detail a few more topics, let me know. The most interesting topics will be added to my list of future posts.

Do you like posts like this? Then, subscribe  and activate push notifications to receive updates. See you next time!