mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Restart validation on form changes.
This commit is contained in:
parent
362d75ef81
commit
1ac31f318e
1 changed files with 3 additions and 0 deletions
|
@ -86,14 +86,17 @@ define [
|
|||
$scope.data.year = parsedDateObj.year
|
||||
|
||||
$scope.validateCardNumber = validateCardNumber = ->
|
||||
$scope.validation.errorFields = {}
|
||||
if $scope.data.number?.length != 0
|
||||
$scope.validation.correctCardNumber = recurly.validate.cardNumber($scope.data.number)
|
||||
|
||||
$scope.validateExpiry = validateExpiry = ->
|
||||
$scope.validation.errorFields = {}
|
||||
if $scope.data.month?.length != 0 and $scope.data.year?.length != 0
|
||||
$scope.validation.correctExpiry = recurly.validate.expiry($scope.data.month, $scope.data.year)
|
||||
|
||||
$scope.validateCvv = validateCvv = ->
|
||||
$scope.validation.errorFields = {}
|
||||
if $scope.data.cvv?.length != 0
|
||||
$scope.validation.correctCvv = recurly.validate.cvv($scope.data.cvv)
|
||||
|
||||
|
|
Loading…
Reference in a new issue