Merge pull request 'added va;idation for contact person. it will accept only alphabetical character' (#79) from pramod_Bug#197 into Issue_May_2W
Reviewed-on: #79
This commit is contained in:
commit
4fe09330c1
@ -28,7 +28,10 @@ const ManageProjectInfo = ({ project, handleSubmitForm, onClose }) => {
|
|||||||
name: z.string().min(1, { message: "Project Name is required" }),
|
name: z.string().min(1, { message: "Project Name is required" }),
|
||||||
contactPerson: z
|
contactPerson: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: "Contact Person Name is required" }),
|
.min( 1, {message: "Contact Person Name is required"} )
|
||||||
|
.regex(/^[A-Za-z\s]+$/, {
|
||||||
|
message: "Contact Person must contain only letters",
|
||||||
|
}),
|
||||||
projectAddress: z
|
projectAddress: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: "Address is required" })
|
.min(1, { message: "Address is required" })
|
||||||
@ -156,6 +159,7 @@ const ManageProjectInfo = ({ project, handleSubmitForm, onClose }) => {
|
|||||||
name="contactPerson"
|
name="contactPerson"
|
||||||
className="form-control"
|
className="form-control"
|
||||||
placeholder="Contact Person"
|
placeholder="Contact Person"
|
||||||
|
maxLength={50}
|
||||||
{...register("contactPerson")}
|
{...register("contactPerson")}
|
||||||
/>
|
/>
|
||||||
{errors.contactPerson && (
|
{errors.contactPerson && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user