File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ var FpJsFormValidator = new function () {
503503 var errors = [ ] ;
504504 var i = constraints . length ;
505505 while ( i -- ) {
506- if ( this . checkValidationGroups ( groups , constraints [ i ] . groups ) ) {
506+ if ( this . checkValidationGroups ( groups , constraints [ i ] ) ) {
507507 errors = errors . concat ( constraints [ i ] . validate ( value , owner ) ) ;
508508 }
509509 }
@@ -516,9 +516,11 @@ var FpJsFormValidator = new function () {
516516 * @param {Array } haystack
517517 * @return {boolean }
518518 */
519- this . checkValidationGroups = function ( needle , haystack ) {
519+ this . checkValidationGroups = function ( needle , constraint ) {
520520 var result = false ;
521521 var i = needle . length ;
522+ // For symfony 2.6 Api
523+ var haystack = constraint . groups || [ 'Default' ] ;
522524 while ( i -- ) {
523525 if ( - 1 !== haystack . indexOf ( needle [ i ] ) ) {
524526 result = true ;
Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ var FpJsFormValidator = new function () {
503503 var errors = [ ] ;
504504 var i = constraints . length ;
505505 while ( i -- ) {
506- if ( this . checkValidationGroups ( groups , constraints [ i ] . groups ) ) {
506+ if ( this . checkValidationGroups ( groups , constraints [ i ] ) ) {
507507 errors = errors . concat ( constraints [ i ] . validate ( value , owner ) ) ;
508508 }
509509 }
@@ -516,9 +516,11 @@ var FpJsFormValidator = new function () {
516516 * @param {Array } haystack
517517 * @return {boolean }
518518 */
519- this . checkValidationGroups = function ( needle , haystack ) {
519+ this . checkValidationGroups = function ( needle , constraint ) {
520520 var result = false ;
521521 var i = needle . length ;
522+ // For symfony 2.6 Api
523+ var haystack = constraint . groups || [ 'Default' ] ;
522524 while ( i -- ) {
523525 if ( - 1 !== haystack . indexOf ( needle [ i ] ) ) {
524526 result = true ;
You can’t perform that action at this time.
0 commit comments