fix create Wallet Rule
- add validation empty input
This commit is contained in:
@ -123,7 +123,16 @@ const AddDialog = () => {
|
|||||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if (formField.id_group.trim() === '' || formField.status.trim() === '') {
|
if (
|
||||||
|
formField.id_group.trim() === '' ||
|
||||||
|
formField.status.trim() === '' ||
|
||||||
|
formField.id_wallet.trim() === '' ||
|
||||||
|
formField.max_transaction_per_day === null ||
|
||||||
|
formField.balance_minimum === null ||
|
||||||
|
formField.balance_maximum === null ||
|
||||||
|
formField.credit_limit === null ||
|
||||||
|
formField.monthly_limit === null
|
||||||
|
) {
|
||||||
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user