From 8ff29fc1b76670c258dd07f94a071d87477230db Mon Sep 17 00:00:00 2001 From: Wikzyy Date: Thu, 10 Apr 2025 17:51:07 +0700 Subject: [PATCH] fix create Wallet Rule - add validation empty input --- src/pages/master/walletRule/blocks/AddDialog.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/master/walletRule/blocks/AddDialog.tsx b/src/pages/master/walletRule/blocks/AddDialog.tsx index 0e5ce46..043f766 100644 --- a/src/pages/master/walletRule/blocks/AddDialog.tsx +++ b/src/pages/master/walletRule/blocks/AddDialog.tsx @@ -123,7 +123,16 @@ const AddDialog = () => { const handleSubmit = (e: React.FormEvent) => { 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.' }); return; }