lengthValidate static method
Implementation
static dynamic lengthValidate(
{required dynamic text, required int length, required String fieldName}) {
return text == null || text.toString().trim() == ''
? "Please Enter $fieldName"
: text.toString().length != length
? "Please enter a valid $fieldName"
: null;
}