@@ -1247,22 +1247,22 @@ function addSetValidityMethod(context) {
1247
1247
1248
1248
ctrl . $setValidity = setValidity ;
1249
1249
1250
- function setValidity ( validationErrorKey , state , options ) {
1250
+ function setValidity ( validationErrorKey , state , controller ) {
1251
1251
if ( state === undefined ) {
1252
- createAndSet ( '$pending' , validationErrorKey , options ) ;
1252
+ createAndSet ( '$pending' , validationErrorKey , controller ) ;
1253
1253
} else {
1254
- unsetAndCleanup ( '$pending' , validationErrorKey , options ) ;
1254
+ unsetAndCleanup ( '$pending' , validationErrorKey , controller ) ;
1255
1255
}
1256
1256
if ( ! isBoolean ( state ) ) {
1257
- unset ( ctrl . $error , validationErrorKey , options ) ;
1258
- unset ( ctrl . $$success , validationErrorKey , options ) ;
1257
+ unset ( ctrl . $error , validationErrorKey , controller ) ;
1258
+ unset ( ctrl . $$success , validationErrorKey , controller ) ;
1259
1259
} else {
1260
1260
if ( state ) {
1261
- unset ( ctrl . $error , validationErrorKey , options ) ;
1262
- set ( ctrl . $$success , validationErrorKey , options ) ;
1261
+ unset ( ctrl . $error , validationErrorKey , controller ) ;
1262
+ set ( ctrl . $$success , validationErrorKey , controller ) ;
1263
1263
} else {
1264
- set ( ctrl . $error , validationErrorKey , options ) ;
1265
- unset ( ctrl . $$success , validationErrorKey , options ) ;
1264
+ set ( ctrl . $error , validationErrorKey , controller ) ;
1265
+ unset ( ctrl . $$success , validationErrorKey , controller ) ;
1266
1266
}
1267
1267
}
1268
1268
if ( ctrl . $pending ) {
@@ -1290,20 +1290,21 @@ function addSetValidityMethod(context) {
1290
1290
} else {
1291
1291
combinedState = null ;
1292
1292
}
1293
+
1293
1294
toggleValidationCss ( validationErrorKey , combinedState ) ;
1294
1295
parentForm . $setValidity ( validationErrorKey , combinedState , ctrl ) ;
1295
1296
}
1296
1297
1297
- function createAndSet ( name , value , options ) {
1298
+ function createAndSet ( name , value , controller ) {
1298
1299
if ( ! ctrl [ name ] ) {
1299
1300
ctrl [ name ] = { } ;
1300
1301
}
1301
- set ( ctrl [ name ] , value , options ) ;
1302
+ set ( ctrl [ name ] , value , controller ) ;
1302
1303
}
1303
1304
1304
- function unsetAndCleanup ( name , value , options ) {
1305
+ function unsetAndCleanup ( name , value , controller ) {
1305
1306
if ( ctrl [ name ] ) {
1306
- unset ( ctrl [ name ] , value , options ) ;
1307
+ unset ( ctrl [ name ] , value , controller ) ;
1307
1308
}
1308
1309
if ( isObjectEmpty ( ctrl [ name ] ) ) {
1309
1310
ctrl [ name ] = undefined ;
0 commit comments