[FOLLOWUP][BUGFIX] Prevent validation from altering the field value 84/48084/2
authorNicole Cordes <typo3@cordes.co>
Wed, 11 May 2016 18:46:33 +0000 (20:46 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 12 May 2016 14:36:55 +0000 (16:36 +0200)
This follow up ensures the initialization of the value.

Resolves: #76124
Releases: master
Change-Id: Ie9981971e97d740df1df8545eb2bbd2dae0b465e
Reviewed-on: https://review.typo3.org/48084
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Tomita Militaru <militarutomita@gmail.com>
Reviewed-by: Nikola Stojiljković <nikola.stojiljkovic@essentialdots.com>
Tested-by: Nikola Stojiljković <nikola.stojiljkovic@essentialdots.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js

index e925172..41c7f09 100644 (file)
@@ -237,7 +237,7 @@ define(['jquery', 'TYPO3/CMS/Backend/FormEngine'], function ($, FormEngine) {
         * @returns {String}
         */
        FormEngineValidation.validateField = function($field, value) {
-               value = value || $field.val();
+               value = value || $field.val() || '';
 
                var rules = $field.data('formengine-validation-rules');
                var markParent = false;