Hi,
I am using bootstrap modal popup, which have Textbox and Button inside it.I want to apply required field validation on that textbox (For ex. Textbox cannot be empty). But when i give any validation, the modal popup gets close.
The Required Field Validator or javascript validation not working , as modal popup gets close and modal backdrop appears (meaning black background)
Any idea which validation or javascript validation can be used, that will appear on modal popup without closing it
Thank You !
Tuhin PaulPosted Oct 16, 2024, 4:17 AM
Prevent form submission on invalid input -
Check that you prevent the form from being submitted if the validation fails by using JavaScript or jQuery to handle the submit event of the form. This way, the modal won't close unless the validation is successful.