6
votes
5answers
1k views

Regex validation for Email Address

I need to validate whether my regex is correct for below scenario. Suggestion's if the regex is correct: Wiki Link Local_part The local-part of the email address may use any of these ASCII ...
4
votes
1answer
35 views
2
votes
1answer
40 views

Using a single validation handler for all controllers in a form

In input validation I'm using this validation method in my all Forms. Here I have a single handler for all TextBoxes in my Form and if I have other controllers like ...
3
votes
4answers
147 views

Input validation for text boxes in a Form

In a Win Form I'm doing initial validation in the Form. So before saving data, I want to validate whether all the required fields are filled (Text Boxes) by the user. There are about 18 such Text ...
3
votes
3answers
66 views

Validating a string under few conditions

Following code validates NIC number of a person (National Identity Card, no like SSN) Requirements are... Length should be 10 digits or characters All should be digits except the last one Last one ...
2
votes
1answer
66 views

User name and password validation in a MVP application

In a WinForms application I'm doing the password validation as follows: When the user presses the OK button after entering username and password, an event will be fired and the listener in the ...
4
votes
1answer
81 views

Amalgamation of the repository and command / query pattern

I am coding a web based solution which consists of N number of tiers, these are: UI Web API Business The question I have is related to validation, repository and CRUD operations. I am adopting the ...
3
votes
2answers
189 views

Simple structure that would contain validation errors messages

Before I go too far, does this look right? This is mostly to have a "central" place that hold a "hierarchical/structured" errors message. ...
3
votes
1answer
142 views

Validating an entity using a dynamic list of predicates

I have a generic extension method for validating my entities. The main idea is to be able to specify at runtime (context related) the criteria for validating a specific entity (with the end goal of ...
3
votes
4answers
138 views

Dealing with non-required user input

I'm working on a page where a user can create new records, but not all values are required. When creating the SqlCommand with potentially null values, I'm wondering what's the best way, from a code ...
2
votes
1answer
666 views

Is there a faster way to get ASP.Net Validation messages in a Page or UserControl?

Edit: The method call discussed is a public extension method in a shared library. I'd like it to be safe for others to call. A little background: I'm maintaining an ancient system written in ...