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
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:
- In Visual Studio Tools menu, select Extensions and Updates….
- Be sure you are in Online section.
- In the Search bar, type Validation Rule Template and Download the extension for your Visual Studio intance.
Reminder: Once you have downloaded the extension reset your Visual Studio intance.
How to use it
- In Solution Explorer, right click on the project or folder you want the empty rule and select Add > New Item…
- In Visual C# Items, select Rule, type your rule name and add it to your project or folder.
- Once you have added, your rule file will look like this.
- Available on NuGet: Plugin.ValidationRules
- Documentation: Validation Rules Plugin for Xamarin and Windows
- Repository: Validation Rules Plugin for Xamarin and Windows
- Extension for Visual Studio: Validations Rule Template
Thank you somuch for reading this post!