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.

35 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
57 views

Form deserializer for Python Flask

I've started working on a small Flask project for no real reason other than fun, and pulled myself back on form validation. I realize that there are existing libraries like WTForms, but wanted to try ...
user avatar
5 votes
0 answers
208 views

Winforms MVP Validation

I have a Winforms MVP application where I need to use the ErrorProvider on the view. I have added the following methods to my presenter to allow me to show the ErrorProvider but it just doesn't feel ...
JammoD's user avatar
  • 255
4 votes
0 answers
180 views

Vuejs - input validation

I'm in a project that's currently using vue. I'm at the moment developing validations for the inputs and in a way to make them more flexible, my idea was to create an intermediate component "...
martinho's user avatar
  • 161
3 votes
0 answers
253 views

Validating a file input whose value is reset to empty string ("") after selection

My form comprises of a mandatory file input. The form is validated according to the jQuery validate plugin. The file input has attribute required so that the ...
user51462's user avatar
  • 131
3 votes
0 answers
804 views

WPF: An implementation of INotifyDataErrorInfo

An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface. ...
Kostas K.'s user avatar
  • 215
3 votes
0 answers
100 views

Validating Amazon CloudFormation templates using Rspec

I have created an open source project that uses Rspec to validate the formatting of AWS::CloudFormation::Init YAML blocks in CloudFormation templates.1 My project is here. Some general concerns: Is ...
Alex Harvey's user avatar
3 votes
0 answers
45 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 ...
klsdskldsd's user avatar
3 votes
0 answers
905 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 ...
Kate Herasimenak's user avatar
3 votes
0 answers
474 views

Define a class for latitude and longitude in C++ using boost::units and spheroidal coordinates

I am trying to write a class that defines latitude and longitude in C++ using boost::units and normalized spheroidal coordinates. I want to throw an exception if ...
nimble_ninja's user avatar
3 votes
0 answers
72 views

Initialising numerical properties from a text-based properties file

This is a Spring Framework-based datasource instantiator which reads its properties from the Spring Framework context, i.e. the values are initially all String from ...
Adam's user avatar
  • 139
3 votes
0 answers
52 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 ...
Prats's user avatar
  • 131
3 votes
0 answers
737 views

Tiny MVC - Handling validation / sanitization in a model

I'm fairly new to MVC concepts and PHP input validation. I'm open to all input, but I'm largely wanting to know if the following: Follows the MVC pattern correctly - if not, how can I change it to ...
m.ed's user avatar
  • 31
2 votes
0 answers
241 views

Set-new-password form, including validation

I've got to make a form using Bootstrap and Angular, which validates the following requirements: Old password, new password and confirm password are mandatory fields. New password has to be equal ...
michael.zech's user avatar
  • 4,358
2 votes
0 answers
91 views

Sanitize input for a "robot on a grid" kata

I have the following piece of code which is FSI tested and works. However, I want to trim it as much as possible (not only the comments, which are there for my own future reference) and make it as ...
user avatar
2 votes
0 answers
51 views

Ensuring a valid JavaScript string in security-critical application

I'm writing an application where users can write custom expressions which are then converted to JavaScript functions and executed. The expressions are used for filtering and sorting data from a ...
csha's user avatar
  • 296
2 votes
0 answers
191 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
mr_muscle's user avatar
  • 197
2 votes
0 answers
114 views

Pricing data checker script

I was recently given a task to implement a data-checker script which given an input file containing (date, last_price) values should check for 3 different kind of errors - missing values, stale values ...
codepirateadam's user avatar
2 votes
0 answers
447 views

WebAPI: Async Filtering CSV content + Json/XML Serialization

I am coding a csv file filtering api in ASP.NET Core, which takes a csv file located at a given uri (and retrieved via the query string) convert the content to a collection of records, then apply a ...
Natalie Perret's user avatar
2 votes
0 answers
71 views

Textbox validation component

My intention is to have a component that serves as a textbox wrapper and able to set the error state, error message, and allow the parent to pass a function that sets its local error as I did not see ...
SCFi's user avatar
  • 163
2 votes
0 answers
42 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, ...
Lucas Bustamante's user avatar
2 votes
0 answers
64 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. ...
BanMe's user avatar
  • 75
2 votes
0 answers
681 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 ...
Alex's user avatar
  • 223
2 votes
0 answers
247 views

IE8 Form Validation

I am writing a custom form validation script compatible with IE8+. I just wanted to make sure I am not messing anything up. I have tested on IE8 its works. However, I want to make sure I am doing it ...
Aslam's user avatar
  • 121
2 votes
0 answers
77 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 ...
Ryan's user avatar
  • 21
2 votes
0 answers
464 views

Custom bang! method and Rails validation

I have a model called booking. ...
lulalala's user avatar
  • 121
2 votes
0 answers
196 views

Angular validation function for a user creation form

I have to make a user creation wizard, there are 3 steps to achieve the insertion of a new user, so every step I have have a validation function to enable the next step. As a first step for the ...
invernomuto's user avatar
2 votes
0 answers
74 views

Checking a user registration form before sending

I think this isn't right way. Maybe you can suggest something about error-displaying in error-container which fill in JS. index.html ...
Konstantin K.'s user avatar
2 votes
0 answers
578 views

Immediately send redirect response, preserving session data

This question is for Laravel 4 only, as the relevant parts are completely refactored in the upcoming Laravel 5. I have written an helper function for validation, so I only have to put this in ...
Gras Double's user avatar
1 vote
0 answers
69 views

Check that inputs are valid dates

I have a method in a class that accepts either a datetime or string parameter. It is shown in the last code block (I didn't include the class). A little background is that I am defining a wrapper ...
Travis DePriest's user avatar
1 vote
0 answers
49 views

App that Builds a list of "targets" for a Text-Based RPG using the games' API

all! I am developing a web "app" with JavaScript and jQuery with the help of a couple of other libraries for ease of use. Its purpose is to collect user ID's and to build a list of "attackable" ...
Kyle's user avatar
  • 11
1 vote
0 answers
239 views

Generics and aggregated evaluation of validation rules

I have a custom system for data validation; it handles anything from method parameters, return values, objects, etc. The core of this system is IValidationRule and ...
pikausp's user avatar
  • 219
1 vote
0 answers
72 views

Optimistic validation on tab change

I have a rather large UI for editing a user within a Angular application. It is split in multiple tabs and in order to reduce complexity the user cannot change the tab unless there is no validation ...
Alexei's user avatar
  • 1,806
1 vote
0 answers
2k views

ValidationAttribute to validate a string against a JSON schema

This is my implementation of an .NET ValidationAttribute to validate a string against a JSON schema. The JSON schema file is stored within the application as an ...
James Law's user avatar
  • 497
1 vote
0 answers
902 views

URL validation and data extraction

What do you think about this approach to validate and analyze URLs? There are Url and Url<TResource> model types to ...
Dmitry Nogin's user avatar
  • 6,131
1 vote
1 answer
50 views

Integer field in Python with extra constraints (Testable class)

I am trying to write an integer field in Python with the following attributes: Minimum Exclusive minimum Maximum Exclusive maximum Multiple of Value Basically, given the constraints and the value, ...
darkhorse's user avatar
  • 418