Created
October 16, 2016 17:18
-
-
Save cpierce/cf6aa33716f8d7e2173f0fdfa385d754 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Build Validator Method. | |
* | |
* @param Validator $validator | |
* | |
* @return Validator $validator | |
*/ | |
protected function _buildValidator(Validator $validator) | |
{ | |
return $validator | |
->notBlank('first_name', __('Your first name is required.')) | |
->notBlank('last_name', __('Your last name is required.')) | |
->creditCard('card_number', [ | |
'amex', | |
'visa', | |
'disc', | |
'mc', | |
], __('Please enter a valid credit card number.')) | |
->notBlank('card_number', __('Credit Card number is required.')) | |
->notBlank('amount', __('Please enter an amount.')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment