Compare commits

...

1 Commits

Author SHA1 Message Date
victorAnumudu 7b5e338e19 changed forget password label from email to username 2025-01-20 17:52:58 +01:00
+5 -5
View File
@@ -10,14 +10,14 @@ import { recoverPWD } from '../../services/services';
const validationSchema = Yup.object().shape({ const validationSchema = Yup.object().shape({
username: Yup.string() username: Yup.string()
.email("Wrong email format") // .email("Wrong email format")
// .matches( // .matches(
// /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/, // /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/,
// "Invalid email format" // "Invalid email format"
// ) // )
.min(3, "Minimum 3 characters") .min(3, "Minimum 3 characters")
.max(50, "Maximum 50 characters") .max(50, "Maximum 50 characters")
.required("Email is required"), .required("Username is required"),
}) })
const initialValues = { const initialValues = {
@@ -50,7 +50,7 @@ export default function Forgetpwd2() {
<div className="d-flex align-items-center h-100-vh"> <div className="d-flex align-items-center h-100-vh">
<div className="login p-50"> <div className="login p-50">
<h1 className="mb-2">Recover Password</h1> <h1 className="mb-2">Recover Password</h1>
<p>Please enter your email.</p> <p>Please enter your username.</p>
<Formik <Formik
initialValues={initialValues} initialValues={initialValues}
validationSchema={validationSchema} validationSchema={validationSchema}
@@ -64,8 +64,8 @@ export default function Forgetpwd2() {
<> <>
<div className="col-12"> <div className="col-12">
<div className="form-group"> <div className="form-group">
<label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Email*</label> <label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Username*</label>
<input type="email" name='username' className="form-control" placeholder="Email" value={props.values.username} onChange={props.handleChange} /> <input type="text" name='username' className="form-control" placeholder="Username" value={props.values.username} onChange={props.handleChange} />
</div> </div>
</div> </div>
{mutation.error && {mutation.error &&