tracker issue
This commit is contained in:
parent
a9b3ab9ffd
commit
8c5f9aea0c
@ -355,8 +355,8 @@ $(document).ready(function(){
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="cfname" class="col-form-label"><span class="contactPerson">Contact Person </span>Email<span class="text-danger"> *</span></label>
|
||||
<input type="text" class="form-control" id="cmail" name="cmail" value="<?= isset($receipt_details['email']) ? $receipt_details['email'] : '' ?>" placeholder="Email" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
<input type="text" class="form-control" id="cmail" name="cmail" value="<?= isset($receipt_details['email']) ? $receipt_details['email'] : '' ?>" placeholder="Email" onblur="validateEmailFormat(this.value)" />
|
||||
<div class="invalid-feedback"> Please provide a valid email address. </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -374,7 +374,8 @@ $(document).ready(function(){
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">+91</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="mobile" value="<?= isset($receipt_details['mobile_no']) ? $receipt_details['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required maxlength="10" onkeypress="return restriction(event)" />
|
||||
<input type="text" class="form-control" name="mobile" value="<?= isset($receipt_details['mobile_no']) ? $receipt_details['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required minlength="10" maxlength="10" onkeypress="return restriction(event)" />
|
||||
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
@ -389,7 +390,17 @@ $(document).ready(function(){
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script>
|
||||
function validateEmailFormat(email) {
|
||||
var emailPattern = /^(.+)@(gmail\.com|yahoo\.com|hotmail\.com|[^@]+\.com)$/i;
|
||||
|
||||
if (!emailPattern.test(email)) {
|
||||
alert("Please provide a valid email addres");
|
||||
// You can also update the UI to indicate the error, e.g., by adding a class to the input field.
|
||||
// Example: $('#cmail').addClass('is-invalid');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user