FIX_VALIDATION

This commit is contained in:
VENKATESHWARAN 2026-05-05 17:17:44 +05:30
parent 3b3e52f874
commit e591ada844

View File

@ -21,6 +21,11 @@
.is-invalid {
border-color: #dc3545 !important;
}
/* Avoid duplicate validation messages: keep custom .field-error only */
#insurer_branch_form .parsley-errors-list {
display: none !important;
}
</style>
<!-- Optional CSS -->
<style>
@ -495,8 +500,15 @@
}
function getErrorElement($field) {
var $next = $field.next('.field-error');
if ($next.length) return $next;
var $group = $field.closest('.form-group');
var $existing = $group.find('.field-error');
if ($existing.length) {
if ($existing.length > 1) {
$existing.slice(1).remove();
}
return $existing.first();
}
var $error = $('<small class="field-error"></small>');
$field.after($error);