Skip to content

Commit

Permalink
Merge pull request #35 from untilhamza/release/v1.4.1
Browse files Browse the repository at this point in the history
Release/v1.4.1
  • Loading branch information
untilhamza authored Mar 12, 2023
2 parents e542a85 + a58c778 commit 1222c8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/BookingForm/BookingForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import TimeSelector from "../TimeSelector/TimeSelector";

import "./BookingForm.css";

const phoneRegex = /^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)])?([-]?[\s]?[0-9])+$/i;
// const phoneRegex = /^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)])?([-]?[\s]?[0-9])+$/i;
const koreanPhoneRegex = /^(0|(\+82))((10\d{7,8})|(2\d{8}))$/;

const schema = yup.object().shape({
name: yup.string().required("Name is required!"),
phone: yup.string().min(8, "*Enter a valid phone number").matches(phoneRegex, "*Enter a valid phone number!").required("*Phone number is required!"),
phone: yup.string().min(8, "*Enter a valid phone number").matches(koreanPhoneRegex, "*Enter a valid phone number!").required("*Phone number is required!"),
email: yup.string().email("Must be a valid email").max(255).required("*Email is required!"),
date: yup.string().required("*Booking date is required!"),
time: yup.string().required("*Booking time is required!"),
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.4.0"
"version": "1.4.1"
}

0 comments on commit 1222c8f

Please sign in to comment.