Add files via upload
This commit is contained in:
parent
1fac908cd5
commit
90f3ce3bd6
@ -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;
|
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:
|
//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() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
@ -33,7 +36,7 @@ $(document).ready(function() {
|
|||||||
const cardHolder = $("#card-holder");
|
const cardHolder = $("#card-holder");
|
||||||
cardHolder[0].setCustomValidity("");
|
cardHolder[0].setCustomValidity("");
|
||||||
|
|
||||||
if(cardHolder.val().length > 5 && holderCheck(cardHolder.val())){
|
if(cardHolder.val().length > 5 && !holderCheck(cardHolder.val())){
|
||||||
$("#cardNameValid").show();
|
$("#cardNameValid").show();
|
||||||
$("#cardNameInvalid").hide();
|
$("#cardNameInvalid").hide();
|
||||||
cardHolder[0].setCustomValidity("");
|
cardHolder[0].setCustomValidity("");
|
||||||
|
@ -125,7 +125,7 @@ class FormPurchase extends Form {
|
|||||||
<label for='card-cvv'>CVV: <span id='cvvValid'>✔</span><span id='cvvInvalid'>❌</span></label>
|
<label for='card-cvv'>CVV: <span id='cvvValid'>✔</span><span id='cvvInvalid'>❌</span></label>
|
||||||
<input type='text' name='card-cvv' id='card-cvv' class='fieldset-cvv' maxlength='3' placeholder='XXX' required /><pre>".$errorCVV."</pre>
|
<input type='text' name='card-cvv' id='card-cvv' class='fieldset-cvv' maxlength='3' placeholder='XXX' required /><pre>".$errorCVV."</pre>
|
||||||
<br />
|
<br />
|
||||||
<label for='card-expiration'>Fecha de Expiración:</label><pre>".$errorCardExpirationMonth.$errorCardExpirationYear."</pre><br />
|
<label for='card-expiration'>Fecha de Expiración: </label><pre>".$errorCardExpirationMonth.$errorCardExpirationYear."</pre><br />
|
||||||
<select name='card-expiration-month' id='card-expiration-month' required>
|
<select name='card-expiration-month' id='card-expiration-month' required>
|
||||||
".$monthsHTML."
|
".$monthsHTML."
|
||||||
</select>
|
</select>
|
||||||
@ -167,7 +167,9 @@ class FormPurchase extends Form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$month = $this->test_input($datos['card-expiration-month']) ?? null;
|
$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.";
|
$result['card-expiration-month'] = "El mes de expiración no es correcto.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user