applied Phone number vaidations in Neb1, Neb2, Neb arise forms
Specific Folder FTP Upload / ftp-deploy (push) Successful in 38s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 38s
Details
This commit is contained in:
parent
4fe210274a
commit
413f812494
|
|
@ -188,6 +188,22 @@
|
||||||
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
|
|
||||||
|
|
||||||
|
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
||||||
|
$('#field-phone_no_of_staff').on('input', function () {
|
||||||
|
|
||||||
|
this.value = this.value.replace(/\D/g, '');
|
||||||
|
|
||||||
|
// First digit must be 6, 7, 8, or 9
|
||||||
|
if (this.value.length > 0 && !/^[6-9]/.test(this.value)) {
|
||||||
|
this.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = this.value.slice(0, 10);
|
||||||
|
|
||||||
|
});
|
||||||
$('#field-user_id').change(function(){
|
$('#field-user_id').change(function(){
|
||||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
$('#field-hierarchy_id').val(hierarchy)
|
$('#field-hierarchy_id').val(hierarchy)
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,22 @@
|
||||||
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
|
|
||||||
|
|
||||||
|
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
||||||
|
$('#field-phone_no_of_staff').on('input', function () {
|
||||||
|
|
||||||
|
this.value = this.value.replace(/\D/g, '');
|
||||||
|
|
||||||
|
// First digit must be 6, 7, 8, or 9
|
||||||
|
if (this.value.length > 0 && !/^[6-9]/.test(this.value)) {
|
||||||
|
this.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = this.value.slice(0, 10);
|
||||||
|
|
||||||
|
});
|
||||||
$('#field-user_id').change(function(){
|
$('#field-user_id').change(function(){
|
||||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
$('#field-hierarchy_id').val(hierarchy)
|
$('#field-hierarchy_id').val(hierarchy)
|
||||||
|
|
|
||||||
|
|
@ -230,11 +230,28 @@
|
||||||
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Phone No. of Staff - Numeric only, max 10 digits
|
|
||||||
|
|
||||||
|
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
||||||
$('#field-phone_no_staff').on('input', function () {
|
$('#field-phone_no_staff').on('input', function () {
|
||||||
this.value = this.value.replace(/\D/g, '').slice(0, 10);
|
|
||||||
|
this.value = this.value.replace(/\D/g, '');
|
||||||
|
|
||||||
|
// First digit must be 6, 7, 8, or 9
|
||||||
|
if (this.value.length > 0 && !/^[6-9]/.test(this.value)) {
|
||||||
|
this.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = this.value.slice(0, 10);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Phone No. of Staff - Numeric only, max 10 digits
|
||||||
|
/*$('#field-phone_no_staff').on('input', function () {
|
||||||
|
this.value = this.value.replace(/\D/g, '').slice(0, 10);
|
||||||
|
});*/
|
||||||
|
|
||||||
const respuleFields = [
|
const respuleFields = [
|
||||||
'#field-budecort_respule',
|
'#field-budecort_respule',
|
||||||
'#field-levolin_respule',
|
'#field-levolin_respule',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue