pablocattaneo
11/24/2015 - 5:54 PM

Validation forms with prototype: list validation css class: http://inchoo.net/magento/out-of-the-box-form-validation-in-magento/

Validation forms with prototype: list validation css class: http://inchoo.net/magento/out-of-the-box-form-validation-in-magento/

<form action="" id="formualrioMonroe" novalidate>
    <input type="tel" name="dni" placeholder="Ingresá tu DNI" id="dni" class="required-entry validate-number"/> <!-- para validar un determinado campo se agrega un clase css ya predefinida en el validador por ejemplo required-entry make de field mandatory -->
	<input type="email" name="email" placeholder="Ingresá tu correo" id="email" class="required-entry validate-email"/>
    <input type="submit" value="Obtener Cupón" class="button">
</form>

<!-- scrip para validar el formulario -->
<script type="text/javascript">
    //< ![CDATA[
        var customForm = new VarienForm('formualrioMonroe'); // ID del formulario a validar
    //]]>
</script>


http://inchoo.net/magento/out-of-the-box-form-validation-in-magento/