validatePassword1Letter function

String? validatePassword1Letter(
  1. String value,
  2. BuildContext context
)

Implementation

String? validatePassword1Letter(String value, BuildContext context) {
  if (!RegExp(r'[A-Z]').hasMatch(value)) {
    return NegoLocalizations.of(context)?.validatePassword1Letter ??
        'The password must contain at least 1 uppercase letter';
  }
  return null;
}