File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -528,7 +528,7 @@ var FpJsFormValidator = new function () {
528528 var errors = [ ] ;
529529 var i = constraints . length ;
530530 while ( i -- ) {
531- if ( this . checkValidationGroups ( groups , constraints [ i ] . groups ) ) {
531+ if ( this . checkValidationGroups ( groups , constraints [ i ] ) ) {
532532 errors = errors . concat ( constraints [ i ] . validate ( value , owner ) ) ;
533533 }
534534 }
@@ -541,9 +541,11 @@ var FpJsFormValidator = new function () {
541541 * @param {Array } haystack
542542 * @return {boolean }
543543 */
544- this . checkValidationGroups = function ( needle , haystack ) {
544+ this . checkValidationGroups = function ( needle , constraint ) {
545545 var result = false ;
546546 var i = needle . length ;
547+ // For symfony 2.6 Api
548+ var haystack = constraint . groups || [ 'Default' ] ;
547549 while ( i -- ) {
548550 if ( - 1 !== haystack . indexOf ( needle [ i ] ) ) {
549551 result = true ;
Original file line number Diff line number Diff line change @@ -528,7 +528,7 @@ var FpJsFormValidator = new function () {
528528 var errors = [ ] ;
529529 var i = constraints . length ;
530530 while ( i -- ) {
531- if ( this . checkValidationGroups ( groups , constraints [ i ] . groups ) ) {
531+ if ( this . checkValidationGroups ( groups , constraints [ i ] ) ) {
532532 errors = errors . concat ( constraints [ i ] . validate ( value , owner ) ) ;
533533 }
534534 }
@@ -541,9 +541,11 @@ var FpJsFormValidator = new function () {
541541 * @param {Array } haystack
542542 * @return {boolean }
543543 */
544- this . checkValidationGroups = function ( needle , haystack ) {
544+ this . checkValidationGroups = function ( needle , constraint ) {
545545 var result = false ;
546546 var i = needle . length ;
547+ // For symfony 2.6 Api
548+ var haystack = constraint . groups || [ 'Default' ] ;
547549 while ( i -- ) {
548550 if ( - 1 !== haystack . indexOf ( needle [ i ] ) ) {
549551 result = true ;
You can’t perform that action at this time.
0 commit comments