Skip to main content

Questions tagged [validation]

Validation is used to check data to make sure it fits whatever required specifications are set for it.

Filter by
Sorted by
Tagged with
0 votes
2 answers
180 views

Checking whether a comment contains text

Is this code good for checking if the variable texto is empty or not? How would it be done with try and catch? ...
user25496's user avatar
0 votes
1 answer
100 views

Fill TextBox from ListBox on click

I have a form in a WinForms application that has a Textbox called txtSupplier, a button called btnSrchSuppliers, a label called <...
user10191234's user avatar
0 votes
1 answer
118 views

Validate 10 digits on a few conditions

I want to write a function that validates the German tax identification number (Steuer-ID). The identification number consists of eleven digits. The last digit is ...
Daniel's user avatar
  • 229
0 votes
1 answer
33 views

Validating with both a field validator and a form valdator

This (minimal demo) code obviously works, but I am a bit taken aback by the hoops I needed to jump through (and little to no mention in Angular (v13) documentation about the technique). I'm still ...
frIT's user avatar
  • 153
0 votes
1 answer
146 views

Advent of Code 2020 - Day 2: validating passwords

Previous: Advent of Code 2020 - Day 1: finding 2 or 3 numbers that add up to 2020 Next: Advent of Code 2020 - Day 3: tobogganing down a slope Problem statement I decided to take a shot at Advent of ...
L. F.'s user avatar
  • 9,580
0 votes
1 answer
325 views

Upload image with GD library

First of all I just started learning OOP. My priority is to make safe code. I think my code is safe, because I use GD to make a copy of the uploaded image and I use an image proxy to make sure nobody ...
mario's user avatar
  • 249
0 votes
1 answer
1k views

Assert LinkedHashMap element in jUnit test [closed]

So I have some test, maybe the given side of that test is not so important to catch the point of my confusion. I wrote ...
shutdown -h now's user avatar
0 votes
2 answers
88 views

jQuery function to display an alert when submitting blank fields

I am new to jquery and implemented following function in a js file in case of error- ...
AnalyticsPy's user avatar
0 votes
1 answer
1k views

Inputs equality check using jQuery without plugins

I tried creating a function to check for a match between two email fields, let's say EMAIL and CONFIRM email. I absolutely try to avoid jQuery validate. It is not worth it for a single field. For the ...
Svetoslav Genov's user avatar
0 votes
3 answers
106 views

Opening and validating an XML file

I have a section of code that repeats many lines and I am looking to refactor this code possibly so that a function can be used instead of the same lines of code each time. Below is the section of ...
user avatar
0 votes
1 answer
399 views

jQuery array of functions validation

I am attempting to validate a set of business rules in order for a user to successfully add to cart. The rules vary from requiting to add/decline a requested add-on to not having more then 60 items in ...
googabeast's user avatar
0 votes
1 answer
59 views

Function to ensure that at least one choice is selected

First here is my settings object below. insight, spike and ...
Leon Gaban's user avatar
0 votes
2 answers
840 views

Validating input values in C#

I began studying C# 5.0 a few days ago and am trying to avoid duplicated code for validation of input values. ...
the1900's user avatar
0 votes
1 answer
851 views

Save user input in server-side database

I have created a site for practice and I have already asked a question on Stack Overflow about XSS. Someone tell me to show your php functions on this site that i created using ...
Aryan's user avatar
  • 1
0 votes
1 answer
205 views

jQuery form validator

I am new to the world of jQuery plugins, I don't know why I didn't get into this sooner. What I have a working validator that validates bootstrap styled forms. What I have discovered is that the way ...
Mark Hill's user avatar
  • 103
0 votes
1 answer
1k views

jQuery .validate() plugin, additional method to validate numbers

A while ago I've written a custom validation method for .validate(). It is a local validation plugin, with some limited validation. I was required to write a validation method with the following ...
Ismael Miguel's user avatar
0 votes
1 answer
90 views

Prompting for grades, with confirmation if a score higher than 100 is entered

This is an exercise from my computer programming class. This program reads in student scores from the user (input) and displays the total points earned along with a grade. I am tasked with modifying ...
Will's user avatar
  • 133
-1 votes
1 answer
167 views

Validation function using both for-loops and indexes at the same time [closed]

This function iterates through a open dialog box that has 4 values in it all optional except for aircraft1, aircraft2, warning_or_alert. ...
JonB's user avatar
  • 421
-1 votes
1 answer
741 views

Javascript to PHP email validation? [closed]

So I'm working on an application where Javascript will first validate the email using a regex and then once sent to PHP, PHP will verify the user did not modify any of the javascript and validate the ...
Joe Scotto's user avatar
-1 votes
1 answer
38 views

NBCJ Passwordchecker [closed]

...
F.Marcano's user avatar
-2 votes
1 answer
74 views

Validate Search Binary Tree [closed]

I was looking to this exercise: Is Valid Binary Search Tree I tried to do the exercise by myself without looking to the solution and my code is "much simpler" than the code I found at the ...
a.dibacco's user avatar
  • 105
-2 votes
1 answer
808 views

An own approach to Angularjs validation

Introduction So i am building a SPA with AngularJS. The application provides a large number of <input> elements and can be seen as a huge form. However, i ...
Wottensprels's user avatar
-2 votes
1 answer
2k views

Simple calculator with validation [closed]

I've implemented a simple calculator in C# that takes in the left operand, the operator, and the right operand. Once the calculate button is clicked, I use four methods to validate the inputs: 1. The ...
Misty Tomlin's user avatar
-3 votes
2 answers
515 views

Which email detection regex is better? [closed]

Here I have 2 email validation regexps, which one is better and why? ...
Robin Rodricks's user avatar
-3 votes
2 answers
125 views

Check if a variable is one of a set of valid strings [closed]

We need to check if a given variable is either "get" or "post". If it's neither then I should throw an error. My teammate and I ...
Gabriel's user avatar
  • 1,053

1
11 12 13 14
15