Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [validation]

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

-2
votes
0answers
11 views

Method ordering for Requirements API [on hold]

Over the past couple of years I've quietly developed a library for enforcing API contracts. The project is hosted at https://bitbucket.org/cowwoc/requirements/ Users write ...
0
votes
0answers
14 views

Making a certificate signing request, with validation

I have a function that takes a handful of parameters and I want to ensure the data being passed to it is the correct data and types. Below is a sample function that I wrote to ensure the parameters ...
-3
votes
0answers
19 views

Bag check for coins with validation [closed]

The objective of the program is to check that the weight of the bag that the user inputs and then calculate how many coins are needed to the added/removed to ensure the bag has the right amount of ...
2
votes
1answer
167 views
+50

A Class to validate password strength

What would be the best approach to write this class. This class validates 3 types of passwords, Normal Medium Strong Github Link ...
1
vote
0answers
20 views

WordPress plugin for shipping calculation

I am writing a WordPress plugin that allows shipping calculation on the product page. Originally, shipping calculation is only available in the cart. To calculate shipping costs on product page, ...
3
votes
1answer
56 views

Simple fluent library to validate text content

Before I can perform a more or less complex mappings, treatments in business objects and saving results in databases, I often need to validate contents from flat text files or excel files All the ...
15
votes
2answers
725 views

Enforcing string validity with the C# type system

One of my biggest complaints about .NET is that there's no way to guarantee a string match a certain type in the type-system. Note This started as more of a proof-of-concept than a real usable ...
0
votes
1answer
45 views

Back end validation as front end validation

I am trying to use the back end validation for front end validation and this is what I got. Maybe there is a better way to do this? If someone knows please share the knowledge. HTML: ...
2
votes
2answers
32 views

Split all images over x amount of pages with $_GET

I would like to receive some feedback on the code I am currently using to display x amount of images on my website per ...
4
votes
1answer
23 views

Compare two strings in extended memory - classic 8052

I'm looking for a simpler code that isn't resource hungry that can compare two strings stored in different locations in the extended memory of a classic 8052 (namely the AT89S52 microcontroller) to ...
2
votes
2answers
62 views

Simple form validation in javascript

Used to use Laravel's easy to use form validation class, decided to mimic it in JS. I've been learning JS for 4 days now and decided to write my first piece of real code. I'm pretty sure its full of ...
2
votes
1answer
42 views

User form validation using a POPO

I'm trying to sketch out a stripped down generic form validation example. I started by creating Plain Old PHP Objects (referred as POPOs) for form input with some classes such as a validator and html ...
1
vote
1answer
28 views

A function to validate that an unbound form in Access has all required fields filled out

My goal in this code review is to see if i can figure out how to optimize the Validate function takes up fewer lines of code. i know there must be a way to cut it down so that it doesnt span 300 lines ...
1
vote
1answer
25 views

TypeScript 3 form validation object

Please, correct me with anything that I say in here (The actual question is below the code). I've been quickly prototyping a project (ASP.NET Core 2.1) and haven't found the need to structure it with ...
3
votes
1answer
89 views

Date input wrapper for TextBox

Purpose I managed to get completely nerd-sniped earlier today by a question over on SO and decided to take a stab at adapting my numeric input wrapper for TextBox...
3
votes
1answer
58 views

Temperature converter in Rust with input error handling

I started learning Rust a few hours ago with the Rust Book (2018 edition) and as part of one of the exercises decided to make a temperature converter. I wanted to make sure it handled all inputs ...
-2
votes
1answer
56 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 ...
0
votes
1answer
32 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 ...
1
vote
0answers
34 views

Ruby - Create a bitmap editor that accepts user input to plot a matrix grid, points and lines

I recently didn't pass a take-home code test for a job interview - and one of the reasons for this was that the code was not as idiomatic as it could be. The premise is in the title - but below ...
2
votes
1answer
39 views

Check values in datatables, with validation rules that vary according to the data source

Background I receive dataframes from several sources (below I call these sources s1, s2 and ...
2
votes
1answer
46 views

Transactionally create something, if allowed

I have been looking over this block of code for hours trying to simplify it. Would there be a better way to check all those conditions before creating a transaction ...
1
vote
1answer
49 views

Check PHP validation code

I have made a form in HTML and the form data should be send via email. For that purpose I have created a PHP script. I did read a lot about the importance of form validation in order to prevent ...
2
votes
2answers
91 views

Validate Email as User is typing (JavaScript)

I have the following javascript function validateEmail(value). The goal of the function is to validate the users inputted email as they are typing. So if someone puts nfg@*gmail.com the email will be ...
1
vote
0answers
31 views

Business logic validation as custom Bean Validation annotations?

This is not my solution but that of an existing application I am enhancing. Basically what they are doing is annotating a Form.java with a custom validator that ...
2
votes
2answers
100 views

PHP login/signup validation class

I am working on a blog with PHP, specially in order to practice OOP. Since the blogging system will handle users, i thought that a Validation class would be a good idea in order to not repeat code ...
2
votes
1answer
333 views

Tkinter based calculator

I've recently finished building a calculator in Python using Tkinter, and would appreciate any and all feedback on it. Please ignore the use of the eval function, ...
1
vote
1answer
49 views

PHP validation class for username, email, and password

I'm relatively new to PHP OOP, currently I'm practising how to use it, however I am not really certain I'm building my classes correctly, I think perhaps I'm missing something out but I'm not entirely ...
3
votes
0answers
24 views

Use a pattern for fields validation

I need to validate the fields of user sent by an API. All works fine but the only one problem is that I don't like the solution is not an OOP solution. In the controller I call the service created by ...
1
vote
0answers
47 views

XML graphing, and attribute existence

I have been working on my own form of validation for XML other then xpath, as a toy project. First off, I use this class to add Validations to the graph to check for and validate they exist. ...
-1
votes
1answer
2k views

Password and confirm password validation in Android Studio

I just wrote this password and password confirmation validation code function that checks to see if a password is empty or not, and is it match (password = confirmPassword). I'm not sure this is the ...
18
votes
8answers
5k views

Program to check if a date is valid or not

I am a novice programmer and am currently learning Python programming by myself through a book. I stumbled upon a question in a chapter and it took me 2 days to figure out a solution for it. Although, ...
2
votes
1answer
29 views

Finding incorrect yml headers

Introduction I am working on a semi large project with a few hundred files. In this project there is a series of lesson.yml files I want to check is formatted correctly. And, yes, every file I want ...
3
votes
1answer
78 views

Convert string to double and check for errors

The following program converts a string to a double, and checks for errors. It uses the strtod() function to do the conversion, and follows the example given for ...
0
votes
0answers
172 views

Candidate registration, with validation, using MVVM

I am new to MVVM. I Created Model class CandidateRegisterModel and ViewModel class CandidateRegisterViewModel ...
0
votes
2answers
48 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- ...
2
votes
1answer
109 views

PHP contact form script

I have created a contact form that originally did not have any mechanism for sending out the email with whatever the user inputted in the fields. I have added it in here along with ReCaptcha check. I ...
5
votes
2answers
537 views

Apple receipt validator

I'm working on a solution for validating Apple receipts. Here's the repository as whole. I based it mostly on the gdx-pay-server library. In my implementation, one of the classes I want to improve is <...
1
vote
1answer
222 views

Form validation for multiple inputs

I created an example of a simple form for multiple inputs (name and phone number) in React. If the user enters invalid data in input field, error text is displayed near the same field. I learned a lot ...
2
votes
0answers
96 views

Form validation for the last name

I created an example of a simple form for a last name input in React, where I can check the validation of the data at the time of input. The last name should contain only small and capital letters. If ...
3
votes
4answers
94 views

Simplify form validation with function

In jQuery, I have been reluctant to create a better form validation, and I feel the time has come for me to do so. With that said, I have been using this particular type of form validation, and I ...
8
votes
2answers
300 views

Validating user-provided control points for a Bézier curve

I have made some code which will validate user input for getting 4 control points for a bezier curve. It works fine however I was just wondering If I could make this code any more compact or efficient?...
4
votes
1answer
64 views

Validator for vertices of a polygon

There is an object which has few properties. I wrote a function for test cases which check if the properties are satisfied or not. The function should throw an exception if the property is not ...
10
votes
4answers
394 views

Validator for mathematical expression in infix form

This program will validate whether a mathematical expression entered by the user is a valid expression based off whether the expression itself has been entered with the correct scope openers and scope ...
3
votes
2answers
72 views

Creating user accounts

I have a method which allows to create user account. It contains some conditions to control empty fields, wrong format of email, weak password, etc. ...
15
votes
6answers
6k views

Verifying IPv6 addresses

While trying to learn Python I stumbled upon a question which asks you to write a code that is able to take an input and verify it to see whether it meets the IPv6 Criteria. I wrote the following ...
5
votes
1answer
98 views

Basic input validation package in Lua

I'm very new to Lua (and programming in general). I wanted to start out with a simple package that validates input based on a set of rules. The code works as intended, but is what I have written is ...
2
votes
1answer
61 views

A basic form with React

I have been working of a basic from using React and I need your help to improve this part of my code, especially validate and ...
2
votes
1answer
98 views

Checking if all questions were answered with javascript

I made a quiz project and I made a code to see if all the questions were answered, using JavaScript. It works, but its way more exhaustive than I wanted it to be. I first check every single option ...
1
vote
0answers
324 views

CodeIgniter CRUD form validation

I've developed a crud "helper" of sorts. Fields/columns are derived from the database and contain everything from the name of the field to the type and size of the field. Part of the system integrates ...
1
vote
0answers
66 views

JSON validator using rules

I'm writing an application that is meant to validate data. The data comes in the form of JSON and I'm using JSON Schema to validate the structure and some of the logic along with functions to ...