Questions tagged as 'jquery-validate'

1
answer

How to configure ASP.NET MVC validation to accept dates pt-BR?

I can not set the formatting of dates on my forms. I've tried several cases, all using the same view: @Html.EditorFor(model => model.Data, new { htmlAttributes = new { @class = "form-control" } }) Case 1: Clean and raw public DateTim...
asked by 18.09.2015 / 21:17
1
answer

Validation jquery validate does not go away when I close the modal bootstrap

How do I validate jQuery validate messages when I close the modal Bootstrap? I have the following codes that run when I close the modal by clicking the Fechar button and when I click on the mask. When I reopen the modal Bootstrap t...
asked by 06.05.2014 / 21:10
2
answers

How to put a "loading" image after validation and submit?

I have the following situation, a form with Jquery validation working. However, since I am sending some attachments in the form via email, I wanted to present an image for the user to wait for. The problems started there. If all form field...
asked by 11.05.2015 / 16:50
1
answer

Validate select with jQuery Validator

I have a select like this: <form action="" id="form"> <select name="unidadeNegocio[]" id="unidadeNegocio" multiple="multiple" > <option> A </option> <option> B </option> <optio...
asked by 25.10.2017 / 15:05
1
answer

Jquery Validate does not work with extension type - File Input

Follow the code: $(document).ready(function () { $("#myform").validate({ ignore: ":hidden", rules: { images: { required: true, extension: "jpg"}, messages: {...
asked by 18.01.2017 / 21:57
1
answer

Cause form validation in an asp.net mvc 5 link

Good afternoon everyone! I have a form, I created the rules using DataNotations and it works great when I use a button or input type submit inside my form. Very well! I want to change this button to a link that will call the ajax functi...
asked by 22.06.2015 / 19:03
2
answers

Is it possible to insert jQuery Validate in PHP?

For example, in my php code it looks like this: if( @$_SERVER['REQUEST_METHOD'] == 'POST' ) { $sobrenome = $_POST['sobrenome']; $erro = ''; if( $nome == 'Qual é o seu sobrenome' ) { $erro .= ''; } elseif ( strlen( $sobrenome...
asked by 08.11.2014 / 23:35
1
answer

SubModel Conditional Validation MVC 4 C #

I have the following problem (I will simplify the classes to facilitate understanding): public class Class1 { [Required] public int? Id_Estabelecimento { get; set; } public string Nm_Nome { get; set; } } public class Class2 {...
asked by 26.08.2014 / 23:02
2
answers

Why does the script not only accept the letter F?

I made a regular expression to accept values from 0.0 to 10.0 and the letter F and with it I'm having problems, it ends up denying in the msg of AddMethod () itself. <html> <head> <script src="jquery-2.0.3.js" type...
asked by 27.02.2014 / 21:22
1
answer

I am validating a cpf field and I need to do a check in the database if this cpf has already been registered if I already bring the message to the user [closed]

//verifica cpf válido jQuery.validator.addMethod("verificaCPF", function (value, element) { // tamanho do cpf if (value.length < 11) return false; // retira pontos, virgulas e traços value = value.replace('.', ''); value =...
asked by 04.10.2018 / 00:53