Most voted "validation" questions
Validation is used to verify data and ensure it meets certain specifications.
Learn more…357 questions
Sort by count of
-
4
votes3
answers3050
viewsHow to change the color of the input using jquery Validate?
I am implementing a jquery form, and I want that when Valida runs and class error is added to the label leaving the red font, I will send a picture representing how I want. <html> <head>…
-
4
votes1
answer1422
viewsPassword validation saved in Sqlite
Hello I’m doing a project for college and I’m new on Android,I’m making an application that the purpose of it is to check if the password is correct to be able to finalize the application, but I’m…
-
4
votes4
answers14424
viewsValidate form before sending
I have an HTML page with an email submission form. I need to check on the same page if the fields were filled in or not at the moment the user clicks the Submit button. Apparently he is ignoring the…
-
4
votes6
answers2089
viewsCheck if a String contains two words
I have a problem with this exercise here: Write a class that validates data (Validacao), with a method to validate a given name (ehNomeValido(nome)). The method must return true pass the following…
-
3
votes1
answer663
viewsValidation of Client fields in ASP . NET MVC 4
I’m needing to do field validations on a system both on the client side and on the server side, on the server side I’ve already been able to do, but I couldn’t find any way to do client side…
-
3
votes5
answers2123
viewsHow to validate CIS in ruby?
To validate CPF and CNPJ I use 'brcpfcnpj' in Gemfile. But I couldn’t find anything to validate the CIS. Validating INSS Specific Registration in Ruby on Rails ?
-
3
votes1
answer1253
viewsDate and time expiration event - PHP
My question is the following: I created a function in PHP to check the current date and check the deadline for the end of a contest. Except that the end of this contest will have a specific time,…
-
3
votes4
answers12782
viewsValidation of CNPJ with Angularjs
I’ve already managed to make a mask, but I still can’t validate whether or not this cnpj exists. What I have today is <input id="input-cnpj" name="cnpj" id="cnpj" ng-model="data.cnpj" type="tel"…
-
3
votes1
answer2029
viewsHow to validate Dbgrid fields before saving?
I have a DBGrid, but I want it to validate the fields before saving to the database. I believe I have to use the event BeforePost but I have no idea how to do it. Someone could give me a hint?…
-
3
votes1
answer425
viewsEF6 Entityvalidationerrors error in filled property
I have a similar problem in two ASP.NET applications with Entity Framework. When I try to update an entity that already has all the required attributes filled I get an exception from…
c# mvc entity-framework-6 validation model-validationasked 9 years, 6 months ago Eduardo Barbosa Oliveira da Si 45 -
3
votes2
answers3134
viewsHibernate Validator @CPF that can be null
I’m using the Hibernate Validator with the annotation @CPF. It is validating beauty, the problem is that my system can have the CPF field without value (null) and Hibernate does not accept it. I put…
-
3
votes1
answer772
views"By Onchange" form validation with javascript
Good afternoon! I am trying to validate a form by "Onchange" with javascript, the script worked correctly but is presenting the following error: When I try to fill in any form field without having…
-
3
votes2
answers407
viewsCompletion of mandatory fields
How do I force at least one of the two fields to be mandatory (is filled)? For example, the fields Celular and Telefone cannot be saved empty, only one of them. My code: //.. } else ((txtNome.Text…
-
3
votes1
answer215
viewsValidating routes in Lumen
In the Laravel have for example: Route::get( '/produtos/mostra/{id}', 'ProdutoController@mostra' )->where('id', '[0-9]+'); How this kind of validation would be done in the Lumen? Given that a…
-
3
votes1
answer714
viewsHow to validate at least one mandatory field?
I have two CPF and CNPJ fields, the user must type only one, but never leave the two fields empty. This way it makes mandatory the two fields: [ 'Cpf' => array('required'), 'Cnpj' =>…
-
3
votes4
answers11902
viewsHow to validate a standard EAN 13 barcode?
I would like to know how to validate a standard EAN 13 barcode like this 9788576356127, this code has 13 digits and the criteria for validation are: Perform the check digit calculation; Check if the…
-
3
votes3
answers3733
viewsCustomize field name in validation error messages
I’m using the Laravel 5.2 Standard Authentication Controller: php artisan make:auth As the names are in English, I need to change to Portuguese. I have already set the locale to Portuguese, in…
-
3
votes1
answer243
viewsHow to validate a script in PEP8?
I noticed some questions that asked about PEP8, something like "in this way is correct?", recent example: Problems with PEP8 indentation rules Then I wondered, is there any way to know if the code…
-
3
votes1
answer252
viewsArray with dynamic ability and how to invalidate other characters in reading
I did the code below but found 2 problems: The value of the vector is set to 100 and must be the amount of numbers the user wants. Another problem I found is that the statement specifies that there…
-
3
votes2
answers2387
viewsDo a custom validation on Laravel 5
I have a system on Laravel 5. I have a Form Request validating the fields of a form with some rules. And here’s what I needed to do: I have a tab on the form that registers the partners of a…
-
3
votes1
answer76
viewsHow to know if the past object is a DOM element?
I’m working with functions I must pass on (Mandatorily) an element GIFT. This function will work with the properties of this DOM element. Example function changeValue(elem, value){ elem.value =…
-
3
votes1
answer1053
viewsValidate form and insert into Database with PHP
Hello I’m still a beginner in PHP and stagnated validating the contact form of my site. Complete client-side validation using Javascript, but on the server-side you still haven’t completed the task,…
-
3
votes2
answers1391
viewsconfirmation of registration via e-mail
I’m setting up a registration system and only need the confirmation part in the email to finish and I’m not able to do this part. I’ve researched tutorials on youtube and tried to apply them to my…
-
3
votes1
answer192
viewsPassword validation with jQuery in steps
My scenario is the following, I have a form and in it I need to do a password validation that needs to contain: At least 6 characters, At least 1 uppercase letter, At least 1 number. This validation…
-
3
votes2
answers846
viewsValidate checkbox fields with Bootstrap Validator
I’m trying to use Bootstrap Validator in the checkbox fields, but I don’t know how to do it. Is there a function in this library that does this or should I do the validation in pure JS? Code:…
-
3
votes1
answer155
viewsSuccess message with ajax boostrap 4 validation
I have this code that works perfectly. On the page cadastrarFuncionario.php are made an INSERT in the database and an image upload and if successful in the upload has a echo "Upload efetuado com…
-
2
votes1
answer101
viewsHow to restrict SAML 2.0’s Authentication Context XSD
I’m trying to restrict the Authentication Context XML Schema Definition of specification SAML 2.0. The XSD document is available at here. The part I’m trying to narrow down is one related to this…
-
2
votes3
answers1927
viewsPHP: filter_input with REQUEST
As most of you know, in PHP 5.2 the function has been implemented filter_input. I’m working quietly with her, no doubt very alarming. The problem is that: I can work well with it, using in the first…
-
2
votes4
answers2258
viewsConditional Data Annotation MVC4
I researched pacas here and did not find a solution for what I wanted. I wonder if anyone has done something similar in MVC4. Model: public class Trabalhador { [Required(ErrorMessage = "*")] public…
-
2
votes2
answers869
viewsValidation with JSF
I want to perform the validation of the form displayed in the image in a different way than the framework requires. The validation would be something like an alert, IE, the user would be informed…
-
2
votes1
answer672
viewsHow to use regular expression in input?
I would like to put in the input onkeyup an expression using html or js an example onkeyup='this.value=this.value.replace(/[^0-9]*/g,"")' this only accepts numbers I want to adapt this…
-
2
votes1
answer1692
viewsDataannotation: How to validate "e-mail" property, check whether or not it exists in the database, with attribute other than in the client and yes in the Server
I have a layered application, and in my presentation layer, I have a ViewModel that is UsuarioViewModel inside this I have a Property calling for public email {get; set;}. Already this validating…
-
2
votes1
answer624
viewsHow to only validate fields that are visible?
I have a form with several fields(inputs, selects), but some are like display: block and others as display:none; as I put the validation at all when I submit the form wanted it to check only those…
-
2
votes5
answers11991
viewsHow to validate and calculate the control digit of a CPF
How does the algorithm that calculates the digit of a CPF (Cadastro da Pessoa Física Brasileiro) work? And how is this calculation used to validate the CPF? If possible, I would like examples in…
-
2
votes1
answer592
viewsLaravel validation
I need to do a data validation coming from an XML, have as I use a Validation Request? Or Validation Request only for data coming from a form?
-
2
votes1
answer1754
viewsHow to translate Summary errors Asp . net validation error messages?
I can’t find a file that brings me the error message strings to be translated, the Annotation are well, only those that bring more complex errors, such as Passwords must have at least one Digit…
-
2
votes3
answers6138
viewsMount Regex to validate password
someone would know to set up a regex to validate numerical and alphabetic sequences of at least 4 digits, like : 1111/1234/abcd/4321/dcba?
-
2
votes1
answer903
viewsHow to validate the IP of a list Emails to know if they are real or fake and can receive messages?
I know there are services that do this, but I would like to know how they do this kind of test, to find out if the email is really valid, not only through a PHP filter, for example: function…
-
2
votes2
answers829
viewsAsp.Net MVC Validators passing through the controller
When we create a project in Asp.Net it by default inserts some validators to be used with Razor, @Html.ValidationMessageFor(model => model.property). I saw in different projects that these…
javascript asp.net-mvc html5 validation jquery-validateasked 9 years, 3 months ago Luiz Negrini 1,424 -
2
votes1
answer344
viewsMVC Hidden Field Encryption - How to decrypt more than one Server-side property
Hello I’m developing a web application mvc 5 and in some cases I need to insert in the view fields @Html.Hiddenfor, only I don’t want to show the value to the user if he views the html code, So far…
-
2
votes2
answers257
viewsdomain after @- HTML
Could someone tell me how to do input only accept an email with a certain domain and reject another ? Ex: [email protected] - ok [email protected] - erro HTML <input type="text"…
-
2
votes3
answers1154
viewsHow do I allow only numbers and a special character in javascript?
I have a validation problem in client-side in case I want to validate the ZIP code field, I need it to only accept the 9 numbers of the ZIP code of the person and the trace - from the CEP, who can…
-
2
votes2
answers2165
viewsMac Address validation algorithm
Does anyone know the validation algorithm used by this site? http://sqa.fyicenter.com/Online_Test_Tools/MAC_Address_Format_Validator.php I searched a lot on the Internet but I could not find, the…
-
2
votes1
answer1598
viewsValidation of RNE (National Aliens Registry) or CIE (Alien Identity Card)
Does anyone know how I can validate the CIE (Foreign Identity Card) or RNE (National Aliens Registry) number? I believe there are two names. Language-independent.
-
2
votes1
answer345
viewsChosen ASP.NET MVC plugin
I’m trying to use the plugin chosen (http://harvesthq.github.io/chosen/) with the DropDownListFor, but when using this plugin the field validation not working. Box.cshtml @model CaixaViewModel…
c# asp.net-mvc validation chosen-jquery-pluginasked 8 years, 9 months ago Pablo Tondolo de Vargas 5,444 -
2
votes1
answer62
viewsHTML5 form validations behave differently in Firefox
I was trying to find a better title for this question, but I still don’t quite know how to explain it, but come on. I have a simple form with three fields, if I miss one of them will be shown a…
-
2
votes1
answer217
viewsLaravel 5.2 $errors empty
I am using Laravel 5.2 and am trying to create a validation for user record. In Usercontroller.php I have: public function postSignUp(Request $request){ $this->validate($request, [ 'email' =>…
-
2
votes3
answers9943
viewsELO and Hipercard credit card validation bin
I’m developing a validation in. js for a webcommerce in order to identify the flag of the credit card entered by the customer without having to select it. I searched several places, contacted the…
-
2
votes1
answer347
viewsValidate with object Annotations within a method
I have a Javabean with several attributes that need to be validated. It has an attribute of type Enum, and according to the value of that attribute, the object needs some specific validations, and…
-
2
votes1
answer1038
viewsCorrect alternative that implements a validator for a date field in Laravel
to. $this->validate($request, [ 'data_nascimento' => 'regex:ddmmyyyy', ]); b. $this->validate($request, [ 'data_nascimento' => 'required|date', ]); c. $this->validate($request, […