employee module changes-2 vadivel J 06-12-2024
This commit is contained in:
parent
7728284015
commit
a51a6d259f
@ -765,6 +765,7 @@
|
||||
class="badge">*</span>
|
||||
<input type="text" id="ifsccode" name="ifsccode"
|
||||
title="Only letters and numbers are allowed"
|
||||
onchange="ifscCodeValidation(this.value)"
|
||||
class="form-control" onkeypress="return alpha(event);"
|
||||
style="text-transform: uppercase" required>
|
||||
</div>
|
||||
@ -1535,4 +1536,24 @@
|
||||
// Your form submission logic here
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function ifscCodeValidation(value) {
|
||||
|
||||
// Define the regex pattern for a valid IFSC code
|
||||
const ifscPattern = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
||||
|
||||
// Check if the value matches the pattern
|
||||
if (ifscPattern.test(value)) {
|
||||
return;
|
||||
} else {
|
||||
alert("Invalid IFSC Code. Please enter a valid one.");
|
||||
$('#ifsccode').val('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -692,6 +692,7 @@ if (!empty($EmpDetails)) {
|
||||
<div class="col-md-3">
|
||||
<label>IFSC Code</label>
|
||||
<input type="text" id="ifsccode" name="ifsccode"
|
||||
onchange="ifscCodeValidation(this.value)"
|
||||
placeholder="IFSC Code" class="form-control"
|
||||
value="<?php echo $IFSCCode; ?>">
|
||||
</div>
|
||||
@ -2059,4 +2060,21 @@ if (!empty($EmpDetails)) {
|
||||
// Your form submission logic here
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function ifscCodeValidation(value) {
|
||||
// Define the regex pattern for a valid IFSC code
|
||||
const ifscPattern = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
||||
|
||||
// Check if the value matches the pattern
|
||||
if (ifscPattern.test(value)) {
|
||||
return;
|
||||
} else {
|
||||
alert("Invalid IFSC Code. Please enter a valid one.");
|
||||
$('#ifsccode').val('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user