Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngModel.$validators.ccCvc = function (value) {
return ngModel.$isEmpty(ngModel.$viewValue) || cvc.isValid(value, $parse(attributes.ccType)(scope))
}
errors.expirationMonth = i18n.translate( 'Choose the expiration month from the list.' );
}
if ( ! values.expirationYear ) {
errors.expirationYear = i18n.translate( 'Choose the expiration year from the list.' );
}
if ( ! values.countryCode ) {
errors.countryCode = i18n.translate( 'Choose your country from the list.' );
}
if ( ! errors.number && ! card.isValid( card.parse( values.number ) ) ) {
errors.number = i18n.translate( 'Enter your number as it is on your card.' );
}
if ( ! errors.cvv && ! cvc.isValid( values.cvv ) ) {
errors.cvv = i18n.translate( 'Enter your security code as it is on your card.' );
}
return errors;
};