minLength

Value must be longer than or as long as n units

@safe
@constraint
struct minLength {}

Members

Functions

check
bool check(T actual)
Undocumented in source. Be warned that the author may not have intended to support it.
errorMessage
string errorMessage()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

n
size_t n;
Undocumented in source.

Examples

assert(test!(minLength(2))("12"));
assert(test!(minLength(2))("123"));
assert(!test!(minLength(2))("1"));

assert(test!(minLength(4))("1234"));
assert(!test!(minLength(4))("123"));

assert(test!(minLength(1))("1"));
assert(!test!(minLength(1))(""));

assert(test!(minLength(0))("1"));
assert(test!(minLength(0))(""));

assert(test!(minLength(2))([99, 98, 97]));
assert(!test!(minLength(2))([1]));

Meta