diff --git a/src/components/Project/ManageProjectInfo.jsx b/src/components/Project/ManageProjectInfo.jsx index 08808fa8..0bb57441 100644 --- a/src/components/Project/ManageProjectInfo.jsx +++ b/src/components/Project/ManageProjectInfo.jsx @@ -21,8 +21,9 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) => const [CurrentProject,setCurrentProject] = useState() const [ isloading, setLoading ] = useState( false ) - - + const [addressLength, setAddressLength] = useState(0); + const maxAddressLength = 500; + const projectSchema = z.object( { ...(project?.id ? { id: z.number().optional() } : {}), name: z.string().min( 1, {message: "Project Name is required"} ), @@ -79,7 +80,9 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) => projectStatusId: String(project.projectStatusId) || "0" , } :{} + ) + setAddressLength(project?.projectAddress?.length || 0); },[project,reset,]) @@ -205,16 +208,20 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) =>
{errors.description.message}
- )} + +{errors.description.message}
+ )} +