Skip to content

Commit 470dbc9

Browse files
committed
✨ Add validation for FormForgot
1 parent 125c61c commit 470dbc9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { required, isEmail } from "../../libs/validation";
2+
3+
function validation(values) {
4+
const { email } = values;
5+
let errors = {};
6+
7+
errors.email =
8+
required(email, "E-mail é obrigatório") ||
9+
isEmail(email, "Preencha com email válido");
10+
11+
return errors;
12+
}
13+
14+
export default validation;

0 commit comments

Comments
 (0)