Strickland
Search…
Validators
Strickland validators are pure functions that accept values and return validation results. Here is an extremely simple validator that validates that the value supplied is the letter 'A', returning the validation result as a boolean.
1
// As an arrow function
2
const letterA = (value) => (value === 'A');
3
4
// As a traditional function
5
function letterA(value) {
6
return (value === 'A');
7
}
Copied!
Last modified 1yr ago
Copy link