password static method

String? password(
  1. String? value, {
  2. String? errorMessage,
})

Implementation

static String? password(String? value, {String? errorMessage}) {
  if (value == null || value.length < 8) {
    return errorMessage ?? 'Password must be at least 8 characters long';
  }
  return null;
}