update
This commit is contained in:
@ -80,7 +80,7 @@ const AddDialog = () => {
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (formField.name === '' || formField.posto_adm_id === 0) {
|
||||
if (formField.name.trim() === '' || formField.posto_adm_id === 0) {
|
||||
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user