mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
only validate expiry when both are set
This commit is contained in:
parent
1a4825a47b
commit
474fa5fe19
1 changed files with 4 additions and 3 deletions
|
@ -16,8 +16,8 @@ define [
|
||||||
|
|
||||||
$scope.data =
|
$scope.data =
|
||||||
number: ""
|
number: ""
|
||||||
month: ""
|
month: undefined
|
||||||
year: ""
|
year: undefined
|
||||||
cvv: ""
|
cvv: ""
|
||||||
first_name: ""
|
first_name: ""
|
||||||
last_name: ""
|
last_name: ""
|
||||||
|
@ -60,7 +60,8 @@ define [
|
||||||
$scope.validation.correctCardNumber = recurly.validate.cardNumber($scope.data.number)
|
$scope.validation.correctCardNumber = recurly.validate.cardNumber($scope.data.number)
|
||||||
|
|
||||||
$scope.validateExpiry = ->
|
$scope.validateExpiry = ->
|
||||||
$scope.validation.correctExpiry = recurly.validate.expiry($scope.data.month, $scope.data.year)
|
if $scope.data.month? and $scope.data.year?
|
||||||
|
$scope.validation.correctExpiry = recurly.validate.expiry($scope.data.month, $scope.data.year)
|
||||||
|
|
||||||
$scope.validateCvv = ->
|
$scope.validateCvv = ->
|
||||||
$scope.validation.correctCvv = recurly.validate.cvv($scope.data.cvv)
|
$scope.validation.correctCvv = recurly.validate.cvv($scope.data.cvv)
|
||||||
|
|
Loading…
Reference in a new issue