alphanumeric static method

String? Function(String?) alphanumeric({
  1. String errorMessage = 'Only letters and numbers are allowed',
})

Ensures the string consists only of letters and numbers.

Implementation

static String? Function(String?) alphanumeric({
  String errorMessage = 'Only letters and numbers are allowed',
}) {
  return _build(errorMessage, (v) => v.isAlphanumeric);
}