Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript YUP utilisation to math certain disire in forms

const schema = Yup.object().shape({
		mail: Yup.string()
			.trim()
			.matches(emailRegexp, "Email is not properly formatted")
			.required("Email is not properly formatted"),
		password: Yup.string().min(
			8,
			"Password shall be at least 8 characters long",
		),
		confirmPassword: Yup.string().oneOf(
			[Yup.ref("password"), null],
			"Passwords must match",
		),
});
 
PREVIOUS NEXT
Tagged: #javascript #YUP #utilisation #math #disire #forms
ADD COMMENT
Topic
Name
7+6 =