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

learn more… | top users | synonyms

2
votes
0answers
27 views

Expression validator service

I'm working on a project (in C++98) that uses a grammar validation service to validate mapping expressions for a small DSL. To simplify the project code, I've written a small interface for using the ...
1
vote
0answers
15 views

Validating Input concerns

I would like to find out if there's a cleaner way to go about validating input before it goes into a function. What I'm doing seems like a lot of code, I'm sure there's a better way. I would also ...
4
votes
1answer
59 views

Form that reveals more fields as each step has been completed

I'm new to JavaScript and jQuery and need input about how to optimize my script: ...
4
votes
1answer
70 views

Code that uses reflection to validate arguments

I wrote an answer to this question on the Software Engineering SE site and was hoping to get it critiqued. (I'm told that it's acceptable to do so). Essentially, this code uses reflection to check to ...
1
vote
1answer
61 views

Using decorator pattern to validate an entity

I am following this article. ...
5
votes
2answers
76 views

Simple Java password rule enforcing

rule 1: length must be between 8 and 50 chars. rule 2: at least 3 of the 4 following rules: --------2a: at least one upper case --------2b: at least one lower case --------2c: at least one numeral ----...
0
votes
0answers
30 views

File attachment validation from contact form

I'm relatively new to PHP programming and working on the server side, and I have this HTML contact form allowing people to upload a .doc, .docx, or .pdf file with the intent of emailing this uploaded ...
2
votes
1answer
50 views

Validation of a couple of model classes using FluentValidator

A couple of model classes are doing the validation using FluentValidator. These model classes are used to Add and Edit the branch data and they are working well but ...
1
vote
4answers
85 views

Validating user input in C# coming from XAML controls

I have page where I am inserting some data into Entry fields. For each Entry I have written in XAML different controls with parameters. One of them is Formated parameter where I am giving a string ...
1
vote
1answer
205 views

Making the parsing of a String to an Int32 robust (valid, positive, not 0 validation)

I've a static method which parses a String (from the App.config) to a Int32. I need to have a valid (since the parsing would fail of course^^), positive and not zero integer. I've done it like this: ...
1
vote
2answers
93 views

Yet another PHP MVC form validation

I'm working on my own "MVC" framework for learning purposes and for personal use. I use the "MVC" expression as a concept not a concrete design pattern. So I refer to MVC as a "separation concept" not ...
1
vote
1answer
25 views

Rails form helper to display email fields and their validation errors

I have a repeated pattern throughout my app that looks like this: ...
1
vote
3answers
74 views

Validate optional input parameters with if(!empty)

I have a function which accepts four parameters, which are all optional. Once they're received, it validates using if(!empty). ...
8
votes
3answers
1k views

Password Validation in Python

I coded a python solution for the question below. I am after the fastest solution. Also, I would be grateful if you could point out parts that are not pythonic / inefficient. Question: A website ...
4
votes
1answer
56 views

Validating attributes of a page in Adobe Experience Manager

I am reviewing the following code written by a fellow developer. I am not an java expert but IMHO i did not feel this is efficient use of exceptions — the reason I feel so is: The below code throwing ...
3
votes
2answers
56 views

Streaming a Pin more natively

In my quest to better myself, it's time for the C++ version of my StreamingPin class, and all relevant helper classes. The F# version: Streaming a Pin functionally(...
1
vote
0answers
39 views

CodeIgniter MVC Controller to validate and save a form

I feel although my controller is over complicated and more should be moved to the model. I've read that the controller shouldn't contain any logic, and just call the model/view, however it currently ...
6
votes
1answer
68 views

Streaming a Pin functionally(ish)

Earlier today I wrote a question (Validating a StreamingPin) and I thought it was a good idea (apparently I was the only one who thought so, but whatever), so I proceeded further with it and developed ...
6
votes
1answer
70 views

Validating a StreamingPin

Recently I was thinking about the keyless entry on my car and how simple it has to be, so I wrote a C# programme to validate a StreamingPin, that is, a pin that is ...
2
votes
1answer
67 views

Registration form validation in jQuery

I have created a registration form using jQuery. I am validating username and password using an AJAX request. The "submit" button is originally disabled and is only enabled when all three fields of ...
1
vote
0answers
63 views

Spring MVC validation Multipart file in form

I need make validation of Multipart file in form class. I wrote custom annotation for form class which validate Multipart file. This code works great, but I don`t know if this is a good approach. ...
2
votes
2answers
70 views

Simple JavaScript precondition checking implementation

I am writing a JavaScript application and would like to validate function arguments in many places. Most of these checks will be for correct argument types, or numeric values within specific ranges. ...
1
vote
2answers
45 views

Form validation for user account creation

What would be a cleaner way to write the following? ...
0
votes
1answer
36 views

Validating search parameters in an Angular $scope

I am using the following function to make a specific filter passing the $scope.searchParams in this way: ...
3
votes
0answers
41 views

JavaScript validator plugin

Please help me to improve the JavaScript validator plugin by making it more OO and robust. Requirement is to trigger the validation if there is an attribute ...
0
votes
1answer
51 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 ...
1
vote
1answer
57 views

Make sure the user enters a valid floating-point number in C

I would like to know if this is a good way to make sure the user enters a valid number. ...
3
votes
1answer
39 views

Validation rules with support for immediate termination of processing

I am picking up a code smell from this code and I am not sure of the best way to rid myself of it. I have a validation class that has a function that returns a list of ...
2
votes
1answer
31 views

Change passwords after being validated

I recently posted a program that I wrote that would change a password after being validated, the program can be found here. I have rewritten this program, it has a couple new features: Usernames ...
6
votes
2answers
62 views

Valid memory address in Python

I am looking for suggestions of improving this function to check whether a memory address is appropriate or not. ...
3
votes
1answer
50 views

Change password after being validated

I'm doing Python programming challenges and have come across one where the object of the challenge was to create a script to change passwords. The script must validate that the password contains, one ...
1
vote
1answer
98 views

Simple email validation script

I was doing a programming challenge and the object was to validate an email address, I wrote a simple little email validator and would like some input on how I can make it more efficient. How it ...
6
votes
3answers
692 views

Validating an IP address and returning the reason it's invalid

I have a method that validates a user-written IP address in an Android application. If it's invalid, I need to know why and notify the user using a Toast. I ...
1
vote
1answer
50 views

Using BigDecimal to validate epoch timestamp in exponential notation

I have some phone records in which epoch time is coming in exponential format like 1467.738871E9. I need to validate those records in which number is not in proper format and drop those records. Right ...
3
votes
2answers
97 views

Simple Input Text Analysis

I've started learning java. I've written a small program I've done in C before. It's simple input analysis. If there is number, program checks if number is prime. Then write number: (value of input ...
4
votes
2answers
122 views

Big Nerd Ranch Bronze Challenge: Disallow Alphabetic Characters

I just completed BNR's bronze challenge for disallowing alphabetic characters, and would love some feedback on what I did right and wrong, and how I can improve my code for reusability and ...
1
vote
3answers
68 views

Validator class for PHP

I've made this validation class in PHP that would take inputs, on initialization sanitize them and validate them specific to the type. It works fine, but I would like to know if there's some bad ...
3
votes
1answer
41 views

Profile creation

I was creating a view with Django that would create a user profile for a website and this is what I came up with: ...
1
vote
1answer
26 views

Preventing duplicate submission in Rails

I have a Rails app where doctors score patients on diagnosis - their score is the model Baseline. Each Baseline has a user id ...
4
votes
1answer
84 views

Javascript contact form validation code

I'm a UI / UX Designer trying to sharpen my JS skills. I wanted someone else to check this code snippet and maybe have a Pro tip to improve or shorten it. Javascript: ...
10
votes
5answers
2k views

Validation that also returns error messages

My Create, Update and Delete methods should return a ...
3
votes
1answer
45 views

Factory to augment JS classes with validation methods

I have some validation classes. To keep things smooth, I create a single class that has those validation classes inside of it. That class will be a singleton, and gets injected into my other classes. ...
5
votes
2answers
115 views

Age verification module in Python

I wrote an age verification module in Python 2.5 . How can I improve on current_year? import time perhaps? ...
1
vote
2answers
77 views

Simple JS validation for two contact forms

I'm not a pro in js so, my code is a mess (but it's working!). I would like to ask your help to reduce some redundancies in two cases. Those two are codes are affecting these two forms: ...
1
vote
3answers
63 views

JavaScript validation form

Could this code be improved? Would you suggest more sophisticated way of doing client-side signup validation? ...
1
vote
1answer
51 views

String length validation predicate

I partially refactored the code so okFields uses the extracted function checkStringLength. Now I also want problemFields() to ...
5
votes
3answers
198 views

ISBN validation with Hibernate Validator

I've written a ISBN-validating annotation. It is to be used in conjunction with Hibernate Validator. I'm pretty satisfied with this code as it works as expected, but I've had to make a design choice ...
3
votes
2answers
140 views

Form validation library

Background: After reading this thought provoking book I decided to write a small library as an exercise. ...
7
votes
3answers
155 views

Unicode Chess PvP with Move Validation

Main Purpose This script allows two players to play chess on a virtual chessboard printed on the screen by making use of the Unicode chess characters. Visual appearence ...
1
vote
1answer
65 views

Handling post-registration action

This code is Express NodeJS code that handles post registration .post action where the user must select a custom username. The username is validated, and if valid, ...