Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mrp500 committed Apr 14, 2024
1 parent 1d7c623 commit bc7c7a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ <h2 class="formcontato__title">Contacto</h2>
<h3 class="formcontato__subtext">¿Quieres contactarme?</h3>
<h3 class="formcontato__subtext">Complete el siguiente formulario y me pondré en contacto con usted lo antes posible. </h3>
<form class="formcontato__form" name="form">
<input class="formcontato__input" type="text" name="nombre" placeholder="Nombre">
<input class="formcontato__input" type="email" name="email" placeholder="E-mail">
<input class="formcontato__input" type="text" name="asunto" placeholder="Assunto">
<textarea class="formcontato__textarea" rows="5" cols="40" id="mensagem" name="mensaje" placeholder="Mensaje"></textarea>
<input class="formcontato__input" type="text" name="nombre" placeholder="Nombre" maxlength="50">
<input class="formcontato__input" type="email" name="email" placeholder="E-mail" maxlength="100">
<input class="formcontato__input" type="text" name="asunto" placeholder="Assunto" maxlength="150">
<textarea class="formcontato__textarea" rows="5" cols="40" id="mensagem" name="mensaje" placeholder="Mensaje" maxlength="500"></textarea>
<button type="submit" class="formcontato__botao">Enviar mensaje</button>
</form>
</div>
Expand All @@ -237,7 +237,7 @@ <h3 class="formcontato__subtext">Complete el siguiente formulario y me pondré e
</div>
</section>
</div>
<!-- Script del documento JavaScript -->
<!-- Script del documento JavaScript -->
<script src="validacion.js"></script>
<script>

Expand Down
3 changes: 0 additions & 3 deletions validacion.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ document.querySelector('.formcontato__form').addEventListener('submit', function
} else if (mensaje.trim() === '') {
alert('Por favor ingrese su mensaje.');
event.preventDefault();
} else if (!regexCaracteres.test(mensaje)) {
alert('El campo de mensaje solo puede contener letras, espacios y guiones.');
event.preventDefault();
} else {
// Aquí envia el formulario si todas las validaciones pasan
}
Expand Down

0 comments on commit bc7c7a5

Please sign in to comment.