validateMatchingPasswords static method

String? validateMatchingPasswords(
  1. String? value,
  2. String password, {
  3. String? message,
})

Implementation

static String? validateMatchingPasswords(
  String? value,
  String password, {
  String? message,
}) {
  if (value == null || value.isEmpty) {
    return message ?? 'Este campo es requerido';
  }
  if (value != password) {
    return message ?? 'Las contraseñas no coinciden';
  }
  return null;
}