Skip to content

Commit e07bbff

Browse files
committed
Updated data validation docs
1 parent 98d6b58 commit e07bbff

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

docs/articles/features/data-validation.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,15 @@ If the value contains only letters, the validator will report valid; otherwise,
6969

7070
Similar to the `AlphaValidator`, the `AlphaNumericValidator` extends the characters in the validation to include numbers also.
7171

72+
### Base64Validator
73+
74+
The `Base64Validator` checks whether a string value is a valid Base64 encoded string.
75+
7276
### BetweenValidator
7377

7478
The `BetweenValidator` validates an `IComparable` value is between a configurable minimum and maximum range.
7579

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`).
7781

7882
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).
7983

@@ -89,6 +93,12 @@ this.Pattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|" + @"([-a-zA-Z0-9!#$%&'*+/
8993

9094
MADE.NET has a comprehensive set of test cases which validate the implementation with a variety of different valid and invalid email addresses.
9195

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+
92102
### IpAddressValidator
93103

94104
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
100110
- Is a digit
101111
- Is a numeric value between 0 and 255
102112

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+
103129
### MaxValueValidator
104130

105131
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.
116142

117143
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).
118144

145+
### PredicateValidator
146+
147+
The `PredicateValidator` validates a value using a custom predicate to ensure that a condition is met.
148+
119149
### RegexValidator
120150

121151
The `RegexValidator` is a generic data validator which validates a value based on a configurable regular expression pattern.

0 commit comments

Comments
 (0)