Commit 73b7189a by Wittaya-PIM

Merge branch 'integration' into wittaya

parents 0f8e2c87 1fe14090
......@@ -43,7 +43,7 @@ class ProfilesController extends AppController
$this->loadModel('MasterProvinces');
$Province = $this->MasterProvinces->find('list', [
'conditions' => [
'is_used' => true],
'is_used' => true],
'keyField' => 'id',
'valueField' => 'province_name_th'
])
......
......@@ -95,8 +95,8 @@
<?php echo $this->Html->script('/js/magnific-popup/jquery.magnific-popup.min'); ?>
<?php echo $this->Html->script('/js/vide/vide.min'); ?>
<?php echo $this->Html->script('/js/validate/jQuery.start.min'); ?>
<?php echo $this->Html->script('/js/validate/jQuery.validate.addValidate'); ?>
<?php echo $this->Html->script('/js/validate/jQuery.validate.min'); ?>
<?php echo $this->Html->script('/js/validate/jQuery.validate.addValidate'); ?>
<!-- Theme Base, Components and Settings -->
<?php echo $this->Html->script('theme'); ?>
<!-- Theme Custom -->
......
......@@ -26,6 +26,12 @@
| 19. ckquarter-min ,Example 'ckquarter-min' = '2'
| ------------------------------------------------------------------------------------------------------------------
*/
jQuery.validator.addMethod("emailtext", function (value, element) {
return this.optional(element) || /^([a-zA-Z0-9@_.])+$/.test(value);
}, "โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง.");
jQuery.validator.addMethod("letterthai", function (value, element) {
return this.optional(element) || /^([a-zA-Zก-๙])+$/.test(value);
}, "เฉพาะตัวอักษรเท่านั้น.");
jQuery.validator.addMethod("letters", function (value, element) {
return this.optional(element) || /^[a-zA-Z]+$/i.test(value);
}, "เฉพาะตัวอักษรเท่านั้น.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment