mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Clean up from #3255
This logic could have been placed in the ValidationException class or the framework.js file. It seems more fitting for it to be in the framework.js file.
This commit is contained in:
parent
c165fc02d7
commit
2092454343
@ -242,8 +242,7 @@ if (window.jQuery.request !== undefined) {
|
||||
|
||||
var isFirstInvalidField = true
|
||||
$.each(fields, function focusErrorField(fieldName, fieldMessages) {
|
||||
|
||||
fieldName = fieldName.replace(/\.(\w+)/g, '[$1]');
|
||||
fieldName = fieldName.replace(/\.(\w+)/g, '[$1]')
|
||||
|
||||
var fieldElement = $form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [name$="['+fieldName+']"], [name$="['+fieldName+'][]"]').filter(':enabled').first()
|
||||
if (fieldElement.length > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user