validation

How can I extend ASP.NET server-side validation controls to raise an event if validation fails?

I am using ASP.NET's server-side validation. In the page_load event I'm calling Page.Validate(), and if Page.IsValid is not true I'm then polling the controls to figure out which ones are not valid, and then determining what actions to take. It would be much easier if each control would raise an event as validation fails, allowing me t...

Regular expression multiline validator

Hi! I believe it is a simple question. :) In my ASP.NET Web Form I have a multiline TextBox which should be validated with RegularExpression Validator. Text box should contain one ore more strings "a" (just 'a' char, nothing else). So far I got these regular expressions for my RegularExpressionValidator object: (?m:(^a$)+) (?m:\A(^a$...

21 CFR part 11 validation for SAAS

In a FDA regulated environment applications need to be validated. I've done that tons of times in my career but now I'm facing SAAS. Has anyone out there faced this before? Any FDA related guideline on this scheme? Besides some black box approach and much support from the provider I see this as hard to do. ...

Problem with adding errors to Validation library in Kohana 3

I need to add some errors to the Validation helper in Kohana 3. Here is what I start with: // validate form $post = Validate::factory($_POST) // Trim all fields ->filter(TRUE, 'trim') // Rules for name ->rule('first-name', 'not_empty') ->rule('last-nam...

mvc 2.0 validation

I am use DataAnnotations validation, it work perfectly but when I validate empty text box field I have error The value '' is invalid how can I customize this error? p.s. error shows only when clients script are off ...

Radio button validation (dynamic name)

I have a list of radio buttons. Each radio button has a dynamic name. Is there a way to check if they are all selected? Because most radio validation scripts uses a static name. ...

How to display validation after the form has been generated via Ajax

I'm struggling to find the best way to display validation messages after a form which has been generated via ajax is submitted. Let me explain better: I've got a page that starts with a few options. Based on what the user selects from dropdowns and by adding new fields, the form is created and at the end the form is submitted. The probl...

struts 2 checkboxlist validation question

I have struts 2 checkboxlist as followed: <s:checkboxlist list="listOfOptions" name="someName" /> I would like to add validation to make sure that at least ONE of the checkboxes has been checked. Any thoughts? Thanks ...

Check if only single record exists.

I have a table with GID ID DefaultA DefaultB DefaultC DefaultD DefaultE DefaultF my requirement is that there should always be one record in the database always. In the front end if the end user tries to update its ok since he will update the existing record.But if he tries to enter a new record I must stop him. ...

Validate Digital Signature using Signature Timestamp

The X509Certificate2Collection.Import method allows to retrieve all certificates from an executable file or from an MSI package. That's fine. Now I want to validate the certificates. The X509Certificate.Verify method validates a certificate against the current time (the Reflector confirms: it uses DateTime.Now). So my first question i...

Is there a way to check if I can use Page.IsValid safely?

I know that calling Page.IsValid in code-behind of an ASP.NET page throws an exception if I didn't explicitly call Page.Validate before or if validation didn't happen automatically in an event handler of a control with enabled "CausesValidation". Sometimes I am in a method or an event of a page where I need to know if all input was vali...

How could I validate a form, but have it return to the same form on action is there was an error? Very newbie question.

Here's my registerFormOne.php code: <?php session_start(); require("validationLibrary.php"); $validForm = true; ?> <html> <head> <title>Registration Form - 1 of 2</title> </head> <body> <h1>Registration - Part 1 of 2</h1> <p>Please fill in all the required information before submitting the informati...

How to use Struts2 validation for conditional validation?

Can Struts2 be used for conditional validation? As in, if checkbox "Other" is filled in, then field "otherDetails" must not be empty? Note that I'm looking for Struts2, not Struts1. Any example is greatly appreciated. ...

AI Chess Valid Moves

Hello everybody! I am trying to write AI Chess and I have a problem. I am ready with pieces movement rules, and I'm trying to remove moves that are not valid (leave the king in check etc). I Wrote something like this: ValidateMove(board); { for(i=0;i<64;i++) if(board[i]==king.opposite) kingpos=board[i]; createmoves(board); if (moves.c...

Accepting only Valid Time

Alright so in Java I want to ask the user for a time in 24-hour format. I have managed to leverage DateFormat and SimpleDateFormat to tell it what format the time is being entered in and then to interpret that accordingly, throwing an exception if it does not follow that format. Here is what I have: DateFormat fmt = new SimpleDateFormat...

Asp.net ValidationExpression

I'm looking for ValidationExpression to allow entering 9 or 10 or 11 or 12 digits. I used these Expressions but did not work with me. "\d{9}|\d{10}|\d{11}|\d{12}" "\d{9}|d{10}|d{11}|d{12}" "\d{9}?|d{10}?|d{11}?|d{12}?" any advice? ...

Running another controller action in Ruby on Rails

This happened to me several times and I'm yet to find an acceptable solution. I have a form in the home page of a site, that forms points to another controller which actually does the job of processing the data. When the form is submitted successfully, the other controller sends you back to the homepage with a nice flash[:notice] messag...

jquery post codeigniter validation

We are using jquery to .load() a form into a div We then use jquery to .post() that form to a codeigniter controller ie /app/post We then want Codeigniter to perform validation but were not sure how to return to a page to display the validation errors? If re re .load() the controller wont it re-init the object and we lose the data? Ar...

XML Validation XSD problem

Hello. XML: <?xml version="1.0" encoding="UTF-8"?> <data> <ac code="JL" auto="1"> <fee>10e</fee> <comission> <if country="JP">5%</if> <else>7%</else> </comission> </ac> <ac code="B2" auto="1"> <fee> <if country="RU">35e 50e 50e 80e 15e 10e</if> <...

Validate Strong Name of Running Assembly

Is it possible for one to check the strong name of a .NET application that is already currently running separately from your own running applications process? EDIT: For clarification, a solution that does not require a hard coded path to the executing assembly would be the most ideal solution. EDIT #2: Is there any way to do this w...