check method
checks the input against the given conditions
Implementation
@override
bool check(String? value) {
if (value == null) {
return false;
}
if(countWhiteSpaces){
return value.length == exact;
}else{
return value.replaceAll(RegExp('\\s+'), '').length == exact;
}
}