FIX_VALIDATION
This commit is contained in:
parent
3b3e52f874
commit
e591ada844
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user