added validation for address, user can't add more than 500 characters.
This commit is contained in:
parent
8715d8e94e
commit
62887548cf
@ -62,7 +62,9 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) =>
|
|||||||
endDate: formatDate(project?.endDate ) || currentDate,
|
endDate: formatDate(project?.endDate ) || currentDate,
|
||||||
projectStatusId: String(project?.projectStatusId || "0"),
|
projectStatusId: String(project?.projectStatusId || "0"),
|
||||||
|
|
||||||
}
|
},
|
||||||
|
mode:"onChange"
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
useEffect( () =>
|
useEffect( () =>
|
||||||
@ -210,7 +212,7 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) =>
|
|||||||
name="projectAddress"
|
name="projectAddress"
|
||||||
className="form-control"
|
className="form-control"
|
||||||
{...register( "projectAddress" )}
|
{...register( "projectAddress" )}
|
||||||
|
maxLength={500}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.projectAddress && <div className="danger-text text-start" style={{fontSize:"12px"}}>{errors.projectAddress.message}</div>}
|
{errors.projectAddress && <div className="danger-text text-start" style={{fontSize:"12px"}}>{errors.projectAddress.message}</div>}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user