confirmPassword function

String? confirmPassword(
  1. String? value,
  2. String? other
)

Implementation

String? confirmPassword(String? value, String? other) {
  if (value == null || value.isEmpty) {
    return t.password.enter;
  }
  if (value.length < 6) {
    return t.password.tooShort;
  }
  if (value.length >= 6) {
    if (value != other) {
      return t.password.noMatch;
    }
  }
  return null;
}