Add error validation
This commit is contained in:
1 parent
6ac19000f7
commit
5f96b17595
5 files changed
+178
-70
No files matched your search
@@ -112,7 +112,7 @@ const CreateMonitor = () => {
|
||||
{ [name]: value },
|
||||
{ abortEarly: false }
|
||||
);
|
||||
|
||||
console.log(error);
|
||||
setErrors((prev) => {
|
||||
const updatedErrors = { ...prev };
|
||||
if (error) updatedErrors[name] = error.details[0].message;
|
||||
|
||||
Reference in new issue
Block a user