Guest User

Untitled

a guest
Jan 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <div class="form-group">
  2. <label for=""><i>Descripción (600 carácteres máx.)</i></label>
  3. <textarea class="form-control" name="Descripcion" id="descripcion" maxlength="600" rows="5" required></textarea>
  4. <textarea class="form-control" name="DescripcionLimpia" id="descripcion_limpia" maxlength="600" rows="5" novalidate></textarea>
  5.  
  6. </div>
  7.  
  8. $("body").on("submit", "#myForm", function(evt)
  9. {
  10.  
  11. // Disable things that we don't want to validate.
  12. $(["input:hidden, textarea:hidden, select:hidden"]).attr("disabled", true);
  13.  
  14. // If HTML5 Validation is available let it run. Otherwise prevent default.
  15. if (this.el.checkValidity && !this.el.checkValidity()) {
  16. // Re-enable things that we previously disabled.
  17. $(["input:hidden, textarea:hidden, select:hidden"]).attr("disabled", false);
  18. return true;
  19. }
  20. evt.preventDefault();
  21.  
  22. // Re-enable things that we previously disabled.
  23. $(["input:hidden, textarea:hidden, select:hidden"]).attr("disabled", false);
  24.  
  25. // Whatever other form processing stuff goes here.
  26. });
Add Comment
Please, Sign In to add comment