Most voted "validation" questions
Validation is used to verify data and ensure it meets certain specifications.
Learn more…357 questions
Sort by count of
-
2
votes2
answers502
viewsWhen to validate fields from a swing form?
I was wondering if someone could help me with the validation of forms fields in java desktop. When should I perform validations, in the field (focusLost) output or in Keystroke(keyPressed), or other…
-
2
votes3
answers641
viewsAdd zeros right Textbox C#
I have a TextBox which only accepts decimal numbers. But sometimes the user does the following: How to do for the event Leave of TextBox it add the two zeroes to the right, in the case of the image…
-
2
votes1
answer2355
viewsUppercase and Lowercase Letters only and regular expression accents
How to create a regular expression in the right way where only uppercase and lowercase letters are accepted, along with accents? This is to validate a string by name, I created it as follows:…
-
2
votes2
answers706
viewsValidation in Laravel 5 in array fields?
Through site collaborators I managed to ask a question Do a custom validation on Laravel 5 on validation in Laravel, where it was possible, validate a field input text only if a Combobox was…
-
2
votes2
answers899
viewsJavascript function for email validation does not enter Else
Can someone tell me why that function can’t get into else? When the email meets the function it usually works only when it does nothing, ie the function recognizes that the condition of the if is…
-
2
votes1
answer407
viewsjavascript validate if the number contains +/-
I have a problem, I have a function that makes a debit in the database, but if the User changes the quantity by putting arithmetic operators the value is negative, thus crediting credits to the user…
-
2
votes0
answers416
viewsValidation with Spring MVC
You guys talk beauty? Well, I started studying Spring by Algaworks courses recently and today I came across a problem, is the following: I have a form that shows me a list of employees, and as it…
-
2
votes2
answers42
viewsModifying my Isauthenticated value in Angularjs
When the token is different from null my Isauthenticated has to be positive, app.controller("HomeCtrl", function ($scope, $location) { let token = localStorage.getItem("token"); $scope.user =…
asp.net-mvc angularjs validation angularjs-scope tokenasked 7 years, 8 months ago Jefferson Souza 167 -
2
votes3
answers1147
viewsWhat is the difference between . on('input') / . on('Paste') / . on('change')?
I was trying to do a validation but with the .on('input') it works better than the .on('Paste') (I needed to put a timeout to make it work), can anyone explain to me the difference between the two?…
-
2
votes1
answer395
viewsHow to validate a text field with Inputverifier?
Usually when I need to validate a text field without using action events, I use focus events such as those available from the interface FocusListener. In this example, I check if the field was…
-
2
votes1
answer164
viewsERROR creating Unique constraint with two fields in the Laravel request?
I tried to implement an example I found here at Stackoverflow however unsuccessfully. RULE: Unique double (user_created - description) / User Code you created and Description Another user could…
-
2
votes2
answers519
viewsValidation in an ATM
The user starts by putting a name to the account and the initial balance, here already has a problem, I want it is not possible to enter negative values or broken numbers In the deposit option I…
-
2
votes1
answer1087
viewsHow to validate Combobox?
I have a Form registration in which you have some fields TextBox and ComboBox, I want my code to allow the user to register only when all fields are filled, but it is only validating TextBox, thus…
-
2
votes0
answers1105
viewsModal form validation with Vue and Vuelidate
I have a form inside a modal and I am doing the validation of fields (client side) using the plugin vuelidate. Use the plugin bootstrap-Vue to create the modal, however, when I implement the…
-
2
votes1
answer7118
viewsCEP validation with mask
I’m doing a ZIP code validation it’s working only I wanted when the user automatically typed the mask, which in case is being manually inserted <html> <head> <title>Validar CEP com…
-
2
votes2
answers2691
viewsUsing two Onsubmit in Javascript and If Function within an Alert
I’m training JavaScript with HTML and CSS and I’m creating a simple web page where I’ll do the BMI calculation. My user besides informing his weight and height,should inform his data:name,e-mail,..…
-
2
votes1
answer437
viewsvalidate all form fields with Javascript
Good morning, all right? I am starting in Javascript and I need to validate all the fields in the form below through this. I was able to validate the first 6 fields, radio and checkbox are missing.…
-
2
votes2
answers61
viewsAddress validations / class / method
Setting I use a method to dynamically instantiate classes and methods. Properties received: modulo = name of briefcase with the files .class.php ferramenta = name of filing cabinet .class.php acao =…
-
2
votes2
answers806
viewsRegex date validation with 2/2/4 characters
Looking hard, I found some explanations on how to validate date with Regex but my knowledge in regex is a little limited yet. With some modifications in the explanations I found, I came to a nice…
-
2
votes1
answer127
viewsLaravel 5.8 - Validation - pass value of one input to validate another
I would like to check if there is a possibility in the formRequest validation to pass the value of one input as a parameter to validate another. Example: Inputs 'company_id', 'email' in formRequest…
-
2
votes0
answers37
viewsProblems validating radio groups with Javascript
I need to validate a set of radio groups so that at least one is selected by the user. If I select nothing and click the Next button, the validation seems to work. The problem is that if I then…
-
2
votes0
answers59
viewsWhere can I find the legislation/regulation/standard that defines the CPF?
I see a lot around the way to validate the CPF checker digit. I also see that the numbers 111.111.111-11, 222.222.222-22, ... are invalid and should be disregarded I also know that the ninth digit…
validationasked 5 years, 1 month ago LeoColman 191 -
2
votes1
answer360
viewsMake input mandatory based on previous input
Guys who can help me, I appreciate. I have some reactive fields in my code, they become mandatory or not based on the previous field, my code is like this <div class="ui-g-12 ui-md-4">…
-
2
votes0
answers126
viewsHow to assign a null value to an input variable if the user leaves the field blank or type zero?
The context in which the problem arose is the following: I have a stored procedure that performs the registration of certain values in a table of my database. In this procedure I set all variables…
-
2
votes0
answers298
viewsValidating a nested and conditionally optional Yup scheme
I am facing a problem when trying to validate a scheme nested with Yup (). My scenario is that I have the following payload (which may not always contain maxAge and maxAge, but at least one of…
-
2
votes1
answer1301
viewsValidating password confirmation in Yup with React
I have to validate a form where the user can update his password, I’m using Yup to do this. My code is like this: const schema = Yup.object().shape({ name: Yup.string().notRequired().min(3, "O nome…
-
2
votes1
answer37
viewsDuplicate field ASP.NET Core MVC
Good morning I am developing a web application and in the registration part I put a CPF field but as it can not be equal to what exists in the bank it of the error, I wanted it to return an error…
asp.net mvc asp.net-core identity validationasked 4 years, 4 months ago Gabriel Rodrigues Pavolin 33 -
1
votes2
answers4081
viewsHow to create user validation with access levels in codeigniter?
I have this model and control that checks and validates users registered in the table tb_users database. I need a script that checks whether the user is 0 or 1 in the column nv_nivel. If the user is…
-
1
votes1
answer520
viewsModel validation with Scope on Ruby on Rails
Suppose the models: class A < ActiveRecord::Base has_many :bs end class B < ActiveRecord::Base belongs_to :a has_many :cs end class C < ActiveRecord::Base belongs_to :b end If I want an…
-
1
votes1
answer89
viewsString with spaces - Regex Ismatch returns true when it should return false
I have the following Regex (?=.*\d)(?!.*\s)(?=.*[a-zA-Z\s]).{6,12} If I do tests on site that test Regex, it works, in the view Model Annotation to validate works, but when I do in service…
-
1
votes2
answers624
viewsHow to apply jQuery Validate rules to multiple fields at once?
I have an ASP.NET form and am using jQuery Validate to apply validation rules in the fields. All my fields have a common rule (required: true) but I couldn’t find a way to apply it all at once.…
-
1
votes2
answers198
viewsdate validation
I am creating a validation class and I have a method to validate dates. When will I validate based on now, strtotime calculates including time. $v->rule( '07/28/2014' , 'before.2014' ) this rule…
-
1
votes1
answer238
viewsValidate Objective-C field
Setting: When filling out a form, it must be checked if one of the fields has been filled in correctly, containing 6 numbers followed by two initials that are the states of Brazil. This is not email…
-
1
votes3
answers1452
viewsValidate URL with ER
I have a validation class and need a method to validate URL’s, but the function filter_var contains flaws to validate them. An example of 3 Urls: The URL is complete returns TRUE #1…
-
1
votes1
answer442
viewsForm validation with index()
I know you can validate with HTML5 or CSS, but just out of curiosity: I found a code on the net that checks if the syntax of a typed email is correct: if(document.dados.email.value=="" ||…
-
1
votes0
answers94
viewsValidate namespace definition
PHP variables, if necessary, can be validated with the following Regular Expression: [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* But what about the namespaces? I have a certain string, coming from a…
-
1
votes1
answer120
viewsValidation of Textbox in Visual Basic 6
How do I validate the textbox to enable or disable a button? That’s the code I’ve made so far. If IsNumeric(txtPedidoCotacao.text) Then cmdMontaPedido.enabled = True cmdCancelar.enabled = True…
-
1
votes1
answer57
viewsValidation of java fields
People as I do a check in java SE for some data, to return a message and ask again this information if it is incorrect, in an elegant way following the good practices of object orientation?
-
1
votes2
answers1503
viewsFind out what type a CNPJ verifier is
I have a class where I can find out if the CNPJ entered by the user is valid or not. What I’d like to do, and what I’m not getting, is show the user which are the last two valid digits he should…
-
1
votes1
answer1761
viewsHow to use required in select in jqBootstrapValidation validated form?
I’m using the library jqBootstrapValidation to validate forms along with properties required and data-validation-required-message (displays a custom error message). Everything is working properly…
-
1
votes0
answers1138
viewsClient-side validation with Dataannotations only works on localhost
I’ve been doing research for three days and I haven’t seen anything like this anywhere else. Checking if it was some kind of hosting block, I hosted the site on godaddy, and then on Azure to…
-
1
votes1
answer752
views@Size, using Hibernate Validator, accuses error in value that should pass validation
I have a Java SE application where I can’t use the @size annotation. This annotation is worked out by the org.hibernate.Validator.Size. There is a user field in the model where I do so: @Size(min =…
-
1
votes1
answer114
viewsIs it essential to use the captcha in the form?
I’m completing a registration form, and I’ve taken some precautions against SQL Injection. And for the sake of aesthetics, I wouldn’t want to insert a captcha. The form in question is for…
-
1
votes1
answer955
viewsHTML5 form validation does not work on iPhone
I have a form with validation of filling the fields HTML5 that does not work on iPhone, someone knows some option that works? <form class="register-form" action="enviar_contato" method="post">…
-
1
votes1
answer465
viewsLaravel 5.2 - validation rule does not work
I need to do a validation of a zip code field, but the following attempts do not work: $rules= ['cep' => 'required|numeric|size:8']; ou $rules= ['cep' => 'required|numeric|min:8']; ou $rules=…
-
1
votes1
answer330
viewsIs there a PHP library or plugin for field validation?
Is there a library, plugin or something that makes the task of validating fields, string and etc easier and more practical? Ex: I have to take the username,e as it is a name will only accept letters…
-
1
votes1
answer642
viewsConfirmation of data Registrations E-mail Password
would like to know the best way to validate E-mail and password, to check if the user has typed the information correctly. Ex: Enter your e-mail address: Confirm your e-mail address: Enter your…
-
1
votes0
answers38
viewsCellular number validation with jQuery
Is there any library that validates the number typed by the user? Example: If the user types (11)11111-1111 or (22)2222-2222 and so on, if you type something similar, it shows that the phone is…
-
1
votes1
answer123
viewsIf and Else problem when validating Edittext fields in the android app
I’m a little confused to do a field validation here on my People Register. The following error appears: Else without if on line 84. I don’t have much experience and I appreciate the understanding of…
-
1
votes1
answer439
viewsValidate Laravel email | Distinct Tables
I have a question regarding the unique field validation in the Laravel. I have two tables with no relationships (users and companies), both have a column email. I need to validate the field email…