You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/features/data-validation.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,11 +69,15 @@ If the value contains only letters, the validator will report valid; otherwise,
69
69
70
70
Similar to the `AlphaValidator`, the `AlphaNumericValidator` extends the characters in the validation to include numbers also.
71
71
72
+
### Base64Validator
73
+
74
+
The `Base64Validator` checks whether a string value is a valid Base64 encoded string.
75
+
72
76
### BetweenValidator
73
77
74
78
The `BetweenValidator` validates an `IComparable` value is between a configurable minimum and maximum range.
75
79
76
-
The range can be configured by setting the `Min` and `Max` values.
80
+
The range can be configured by setting the `Min` and `Max` values, as well as an `Inclusive` flag to configure whether the minimum and maximum values are included in the range (defaults to `true`).
77
81
78
82
The in-box `System` types which implement the `IComparable` interface can be [found in the Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable?view=net-5.0).
MADE.NET has a comprehensive set of test cases which validate the implementation with a variety of different valid and invalid email addresses.
91
95
96
+
### GuidValidator
97
+
98
+
The `GuidValidator` checks whether a string value is a valid GUID.
99
+
100
+
The underlying implementation uses the `Guid.TryParse` method to validate the string.
101
+
92
102
### IpAddressValidator
93
103
94
104
The `IpAddressValidator` is a simple data validator which ensures that a value is a valid IP address.
@@ -100,6 +110,22 @@ The implementation splits the IP address into each nibble and validates them bas
100
110
- Is a digit
101
111
- Is a numeric value between 0 and 255
102
112
113
+
### LatitudeValidator
114
+
115
+
The `LatitudeValidator` validates a value is within the valid range for a latitude value (-90 and 90).
116
+
117
+
### LongitudeValidator
118
+
119
+
The `LongitudeValidator` validates a value is within the valid range for a longitude value (-180 and 180).
120
+
121
+
### MacAddressValidator
122
+
123
+
The `MacAddressValidator` is a simple data validator which ensures that a value is a valid MAC address.
124
+
125
+
The implementation uses the .NET `PhysicalAddress` class to parse the provided value.
126
+
127
+
For more information on the `PhysicalAddress` class, see the [Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/api/system.net.networkinformation.physicaladdress?view=net-6.0).
128
+
103
129
### MaxValueValidator
104
130
105
131
The `MaxValueValidator` validates an `IComparable` value is less than a configurable maximum value.
@@ -116,6 +142,10 @@ The minimum can be configured by setting the `Min` value.
116
142
117
143
The in-box `System` types which implement the `IComparable` interface can be [found in the Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable?view=net-5.0).
118
144
145
+
### PredicateValidator
146
+
147
+
The `PredicateValidator` validates a value using a custom predicate to ensure that a condition is met.
148
+
119
149
### RegexValidator
120
150
121
151
The `RegexValidator` is a generic data validator which validates a value based on a configurable regular expression pattern.
0 commit comments