Add files via upload

This commit is contained in:
Fernando Méndez 2021-06-03 12:29:18 +02:00 committed by GitHub
parent 1fac908cd5
commit 90f3ce3bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -7,7 +7,10 @@
const regExpr = /^([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\']+[\s])+([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\'])+[\s]?([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\'])?$/g;
//Expresión regular para validar un código promocional:
const refExprCode = /^0?[xX]?[0-9a-fA-F]*$/;
const regExprCode = /^0?[xX]?[0-9a-fA-F]*$/;
//Fecha acutal:
const fecha = new Date();
$(document).ready(function() {
@ -33,7 +36,7 @@ $(document).ready(function() {
const cardHolder = $("#card-holder");
cardHolder[0].setCustomValidity("");
if(cardHolder.val().length > 5 && holderCheck(cardHolder.val())){
if(cardHolder.val().length > 5 && !holderCheck(cardHolder.val())){
$("#cardNameValid").show();
$("#cardNameInvalid").hide();
cardHolder[0].setCustomValidity("");

View File

@ -167,7 +167,9 @@ class FormPurchase extends Form {
}
$month = $this->test_input($datos['card-expiration-month']) ?? null;
if ( empty($month) ) {
//$TODAY = getdate();
//$actualMonth = "$TODAY[month]";
if ( empty($month) /*|| $month < $actualMonth*/) {
$result['card-expiration-month'] = "El mes de expiración no es correcto.";
}