Skip to content

Commit

Permalink
feat: add roll number regex (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dami-18 authored Jul 13, 2024
1 parent 35e616f commit bb96cbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/RollForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ interface IFormInput {
const schema = yup.object().shape({
roll_number: yup
.string()
.required("Roll number is required!"),
.required("Roll number is required!")
.matches(/^\d{2}[A-Z]{2}[A-Z0-9]{5}$/, "Please enter valid roll number!"),
password: yup.string().required("Password is required!"),
});

Expand Down

0 comments on commit bb96cbd

Please sign in to comment.