- set error as null instead of delete it
- customize checkbox to pass in element as label - adjust checkbox posion to appear align top with string within the element label based on review feedback - remove the checkbox margin setting instead of comment out
This commit is contained in:
1 parent
407e5a8711
commit
a9aece6123
3 files changed
+37
-29
No files matched your search
@@ -29,13 +29,13 @@ const hasValidationErrors = (form, validation, setErrors) => {
|
||||
}
|
||||
// Handle conditionally usage number required cases
|
||||
if (!form.cpu || (form.cpu && form.usage_cpu)) {
|
||||
delete newErrors["usage_cpu"];
|
||||
newErrors["usage_cpu"] = null;
|
||||
}
|
||||
if (!form.memory || (form.memory && form.usage_memory)) {
|
||||
delete newErrors["usage_memory"];
|
||||
newErrors["usage_memory"] = null;
|
||||
}
|
||||
if (!form.disk || (form.disk && form.usage_disk)) {
|
||||
delete newErrors["usage_disk"];
|
||||
newErrors["usage_disk"] = null;
|
||||
}
|
||||
});
|
||||
if (Object.keys(newErrors).length > 0) {
|
||||
|
||||
Reference in new issue
Block a user