dropdownValidate static method

dynamic dropdownValidate({
  1. required dynamic selectValue,
  2. required String dummyValue,
  3. required String fieldName,
})

Implementation

static dynamic dropdownValidate(
    {required dynamic selectValue,
    required String dummyValue,
    required String fieldName}) {
  return selectValue == null ||
          selectValue.toString().trim() == '' ||
          selectValue.toString().toUpperCase() == dummyValue.toUpperCase()
      ? "Please Select $fieldName"
      : null;
}