I use below jquery.validation to validation email at the front-end. It works fine.
jQuery(function(){
//checking email is blank or not
jQuery("#email").validate({
expression: "if(VAL) return true; else return false;",
message: "<?php echo JText::_('Error in email'); ?>"
});
});
PHP – Joomla Save Button
JToolBarHelper::save();
I use joomla native save button to fire to save task in my controller.
HTML
<input type="text" name="email" id="email" value="">
My problem is jquery validation does not stop joomla submit. What I want to do is when user click SAVE I want to submit the form only if there are no validation error. How can I do it ? Thanks
May this will be helpful to you-
for more details – http://docs.jquery.com/Plugins/Validation/valid