Jquery email syntax validation script
Budget: $10 – $30 USD
Budget is $10.
I need this code to show content after a valid email syntax has been entered. Just needs to validate that there is an @ symbol, a period and at least to characters after the period and there should be characters before the @ symbol as well.
The code should include something like this to validate the email:
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}
[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
Here is my code that needs to be updated:
<!-- Show Hide Code -->
<script>
$('input#field-customer-email').keyup( function() {
if( this.value.length < 5 ) return;
$('li.list-shipping_options-row.active, ul.list-shipping_options').show();
$('div#payment-processor-wrap, .builder-v2-widget.tc-v2-widget-core_fields_payment.builder-v2-widget-unsortable').show();
$('.builder-v2-widget.tc-v2-widget-core_bump_offer').show();
$('.card_icons').show();
$('.builder-v2-widget.tc-v2-widget-core_pricing_breakdown').show();
$('.got-questions').show();
$('div#accordion').show();
$('.checkout-pane-controls').attr('style','display:block !important');
});
$('li.list-shipping_options-row.active, ul.list-shipping_options').hide();
$('div#payment-processor-wrap, .builder-v2-widget.tc-v2-widget-core_fields_payment.builder-v2-widget-unsortable').hide();
$('.builder-v2-widget.tc-v2-widget-core_bump_offer').hide();
$('.card_icons').hide();
$('.builder-v2-widget.tc-v2-widget-core_pricing_breakdown').hide();
$('.got-questions').hide();
$('div#accordion').hide();
</script>
<!-- Show Hide Code -->
I need this code to show content after a valid email syntax has been entered. Just needs to validate that there is an @ symbol, a period and at least to characters after the period and there should be characters before the @ symbol as well.
The code should include something like this to validate the email:
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}
[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
Here is my code that needs to be updated:
<!-- Show Hide Code -->
<script>
$('input#field-customer-email').keyup( function() {
if( this.value.length < 5 ) return;
$('li.list-shipping_options-row.active, ul.list-shipping_options').show();
$('div#payment-processor-wrap, .builder-v2-widget.tc-v2-widget-core_fields_payment.builder-v2-widget-unsortable').show();
$('.builder-v2-widget.tc-v2-widget-core_bump_offer').show();
$('.card_icons').show();
$('.builder-v2-widget.tc-v2-widget-core_pricing_breakdown').show();
$('.got-questions').show();
$('div#accordion').show();
$('.checkout-pane-controls').attr('style','display:block !important');
});
$('li.list-shipping_options-row.active, ul.list-shipping_options').hide();
$('div#payment-processor-wrap, .builder-v2-widget.tc-v2-widget-core_fields_payment.builder-v2-widget-unsortable').hide();
$('.builder-v2-widget.tc-v2-widget-core_bump_offer').hide();
$('.card_icons').hide();
$('.builder-v2-widget.tc-v2-widget-core_pricing_breakdown').hide();
$('.got-questions').hide();
$('div#accordion').hide();
</script>
<!-- Show Hide Code -->