Added array validation to ProcessFormErrors
This commit is contained in:
parent
8e3338dbc7
commit
a44e951f72
|
|
@ -163,7 +163,8 @@ function processFormErrors($form, errors)
|
|||
{
|
||||
$.each(errors, function (index, error)
|
||||
{
|
||||
var $input = $(':input[name=' + index + ']', $form);
|
||||
var selector = (index.indexOf(".") >= 0) ? '.' + index.replace(/\./g, "\\.") : ':input[name=' + index + ']';
|
||||
var $input = $(selector, $form);
|
||||
|
||||
if ($input.prop('type') === 'file') {
|
||||
$('#input-' + $input.prop('name')).append('<div class="help-block error">' + error + '</div>')
|
||||
|
|
|
|||
|
|
@ -4066,7 +4066,8 @@ function processFormErrors($form, errors)
|
|||
{
|
||||
$.each(errors, function (index, error)
|
||||
{
|
||||
var $input = $(':input[name=' + index + ']', $form);
|
||||
var selector = (index.indexOf(".") >= 0) ? '.' + index.replace(/\./g, "\\.") : ':input[name=' + index + ']';
|
||||
var $input = $(selector, $form);
|
||||
|
||||
if ($input.prop('type') === 'file') {
|
||||
$('#input-' + $input.prop('name')).append('<div class="help-block error">' + error + '</div>')
|
||||
|
|
|
|||
Loading…
Reference in New Issue