pukal
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<div class="input-group my-3">
|
||||
<input type="text" class="form-control" id="noic" name="noic" placeholder="No Kad Pengenalan Pelanggan" aria-label="No Kad Pengenalan Pelanggan" autocomplete="off" value="{{$search == false ? '' : $noic ?? ''}}" aria-describedby="button-addon2">
|
||||
<div class="input-group-append">
|
||||
<select class="form-select" id="customerIDType" name="customerIDType">
|
||||
<select class="form-select" id="customerIDType" name="customerIDType" class="form-control">
|
||||
<option value="nokp" {{ $idtype == 'nokp' ? 'selected' : ''}}>Kad Pengenalan</option>
|
||||
<option value="passport" {{ $idtype == 'passport' ? 'selected' : ''}}>Passport</option>
|
||||
</select>
|
||||
@@ -526,7 +526,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
if(customerphone.length < 8 && customerphone.length > 12){
|
||||
if(!(customerphone.length < 9 && customerphone.length >= 12)){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -653,7 +653,7 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
if(customerphone.length < 8 && customerphone.length > 12){
|
||||
if(customerphone.length <= 9 && customerphone.length >= 12){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -674,7 +674,7 @@
|
||||
}
|
||||
}
|
||||
if(customerphone_alternate != ''){
|
||||
if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){
|
||||
if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -821,11 +821,11 @@
|
||||
|
||||
return leapYearCount;
|
||||
}
|
||||
|
||||
var regex = /^[a-zA-Z0-9]+$/g;
|
||||
|
||||
function verifynokp(){
|
||||
var id_type = $('#customerIDType').val();
|
||||
var nokp = $('#noic').val();
|
||||
|
||||
if(id_type=='nokp'){
|
||||
if($.isNumeric(nokp) == false){
|
||||
Swal.fire({
|
||||
@@ -864,6 +864,15 @@
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if(regex.test(nokp) == false){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa Passport Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user