validateSingle method
Implementation
bool validateSingle(dynamic value) {
if (value == null) return true;
var str = value as String;
if (min != null) {
if (str.length < min!) return false;
}
if (max != null) {
if (str.length > max!) return false;
}
return true;
}