Merge pull request #15813 from eileenmcnaughton/fee
[civicrm-core.git] / templates / CRM / Form / validate.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* Initialize jQuery validate on a form *}
11 {* Extra params and functions may be added to the CRM.validate object before this template is loaded *}
12 {if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formClass}
13 {assign var=crm_form_validate_included value=1}
14 {literal}
15 <script type="text/javascript">
16 CRM.$(function($) {
17 $("form.{/literal}{$form.formClass}{literal}").crmValidate();
18 });
19 </script>
20 {/literal}
21 {/if}