Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
smart_core_connect
/
core-connect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1fe14090
authored
Jun 06, 2018
by
Zen-PC\Zen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zen : update validate
parent
7d868639
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
www/src/Template/Profiles/index.ctp
+3
-3
www/webroot/js/validate/jQuery.validate.addValidate.js
+1
-4
No files found.
www/src/Template/Profiles/index.ctp
View file @
1fe14090
...
...
@@ -66,7 +66,7 @@ use Cake\I18n\Time;
<?php echo __('firstname');?>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.firstname_th', [
'class' => 'form-control-reg border-bottom-from label-text-sub required',
'class' => 'form-control-reg border-bottom-from label-text-sub required
letterthai
',
'value' => $responseUserPersonal['firstname_th'],
'id' => 'firstname_th',
'type' => 'text', 'label' => false,
...
...
@@ -81,7 +81,7 @@ use Cake\I18n\Time;
<?php echo __('lastname');?>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.lastname_th', [
'class' => 'form-control-reg border-bottom-from label-text-sub required',
'class' => 'form-control-reg border-bottom-from label-text-sub required
letterthai
',
'value' => $responseUserPersonal['lastname_th'],
'id' => 'lastname_th',
'type' => 'text', 'label' => false,
...
...
@@ -174,7 +174,7 @@ use Cake\I18n\Time;
<?php echo __('email');?>
<em>* </em>
<?php echo $this->Form->input('UserPersonals.email', [
'class' => 'form-control-reg border-bottom-from label-text-sub required email',
'class' => 'form-control-reg border-bottom-from label-text-sub required email
emailtext
',
'value' => $responseUserPersonal['email'],
'id' => 'email',
'name' => 'email',
...
...
www/webroot/js/validate/jQuery.validate.addValidate.js
View file @
1fe14090
...
...
@@ -27,14 +27,11 @@
| ------------------------------------------------------------------------------------------------------------------
*/
jQuery
.
validator
.
addMethod
(
"emailtext"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z@_.
])
+$/
.
test
(
value
);
return
this
.
optional
(
element
)
||
/^
([
a-zA-Z
0-9
@_.
])
+$/
.
test
(
value
);
},
"โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง."
);
jQuery
.
validator
.
addMethod
(
"letterthai"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
([
a-zA-Zก-๙
])
+$/
.
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
);
},
"เฉพาะตัวอักษรเท่านั้น."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment