validatePassword function
Implementation
Either<ValueFailure<String>, String> validatePassword(String input) {
// const passwordRegex = r"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{6,}$";
if (input == "") {
return const Left(
ValueFailure.missing(field: "password"),
);
// } else if (RegExp(passwordRegex).hasMatch(input)) {
// return Right(input);
// } else if (input.length < 8) {
// return Left(
// ValueFailure.shortPassword(failedValue: input, field: "password"),
// );
// } else {
// return Left(
// ValueFailure.invalidPassword(failedValue: input, field: "password"),
// );
}
return Right(input);
}