isAlphaNumeric static method

bool isAlphaNumeric(
  1. Map<String, dynamic> data,
  2. dynamic value,
  3. String args
)

check field is only with alphabetic, number

Implementation

static bool isAlphaNumeric(
    Map<String, dynamic> data, dynamic value, String args) {
  RegExp alphaNumericRegex = RegExp(r'^[a-zA-Z0-9]+$');
  return alphaNumericRegex.hasMatch(value.toString());
}