PHP SMARTY 樣板引擎
一、bootstrapvalidator 官網:https://github.com/nghuuphuoc/bootstrapvalidator
二、使用
- 下載 class/bootstrapValidator 至 class/ 底下解壓縮
 - 引入,在主樣板已有引入,所以在子樣板不必再引入。
	
<!-- bootstrap 驗證 -->
<link rel="stylesheet" href="<{$xoAppUrl}>class/bootstrapValidator/css/bootstrapValidator.css"/>
<script type="text/javascript" src="<{$xoAppUrl}>class/bootstrapValidator/js/bootstrapValidator.js"></script>
	
 - 調用插件
	
  <script type="text/javascript">
    $(document).ready(function() {
      $('#opForm').bootstrapValidator({
          //live: 'disabled',//
          message: '此值無效',
          feedbackIcons: {
              valid: 'glyphicon glyphicon-ok',
              invalid: 'glyphicon glyphicon-remove',
              validating: 'glyphicon glyphicon-refresh'
          },
          fields: {
            title: {
              validators: {
                notEmpty: {
                  message: '必填'
                }
              }
            }
          }
      });
    });
  </script>
	
 - 參數說明