validation

Firefox addon or other tool to locally validate HTML pages

I have a rails project with a lot of duplicate id's (it looks like id's were used like class should have been used), so obviously this is bad. I need to refactor everything to get rid of the duplicate id's, and need some addon for Firefox (ideally) to validate the page as I view it to ensure there are no duplicate id's, since it's not s...

How to extend the ValidationSummary HTML Helper in ASP.NET MVC?

I need to wrap the Validation Summary in a div. How do I set the Validation Summary to wrap it with a div when errors are present? <div class="validation-summary"> <%= Html.ValidationSummary("Login was unsuccessful. Please correct the errors and try again.") %> </div> ...

Validation and Linq

Hello, I am trying to add validation logic into my application. I have tried to follow this tutorial http://www.a2zdotnet.com/View.aspx?id=75 but I do not have any partial void OnEmailIdChanging(string value) or any "changing" functions. in my class, so I get an error from Visual Studio. It seems that VS did not generate enough code wh...

Multiple Validation Linq

Hello, I am trying to add validation logic into my Linq asp.net application for multiple fields. I have found on the web a lot of tutorial that validate only one element. Is there a good pattern to implement validation and show to the users his multiple mistakes in one time ? Thank you! ...

How do I validate fields when using the asp.net wizard control?

I have a wizard control in my asp.net 2.0 project, and it contains a few steps. The second step has a textbox with a standard requiredfieldvalidator control attached to it. When the user clicks Next and the box is empty, the validator complains, all is normal. However, when the user uses the sidebar steps to skip to the next-to-last ste...

How can I handle a Validation.Error in my ViewModel instead of my View's code behind?

I'm trying to get WPF validation to work within the MVVM pattern. In my View, I can validate a TextBox like this which gets handled by the code-behind method "HandleError", which works fine: <TextBox Width="200" Validation.Error="HandleError"> <TextBox.Text> <Binding Path="FirstName" NotifyOnValidation...

Is there a way to call the BeforeUpdate event procedure of any control in VBA (MS Access 2002 or 2003) ?

Hi, In VBA, I'm changing the value of a few controls in an Access form. I like to run the BeforeUpdate events of these controls after doing so, as it checks the coherence between fields : Private Sub ExampleProc1() Dim intCancel as Integer intCancel = False Me.Controls("Date1").Value=Null Me.Controls("Textfield1").Value=Null ...

Fast way to validate if all checkboxes are un-selected?

Is there a quick way or function that would tell me true/false if all check boxes are deselected? Without going through array? (with JS and HTML) All my check boxes have the same name... <form action="/cgi-bin/Lib.exe" method=POST name="checks" ID="Form2"> <input type=checkbox name="us" value="Joe" ID="Checkbox1"> <input type=c...

How do you validate uniqueness of a pair of ids in Ruby on Rails?

Suppose the following DB migration in Ruby: create_table :question_votes do |t| t.integer :user_id t.integer :question_id t.integer :vote t.timestamps end Suppose further that I wish the rows in the DB contain unique (user_id, question_id) pairs. What is the right dust to put in the model to accompli...

C# How can I check if a URL exists/is valid?

I am making a simple program in visual c# 2005 that looks up a stock symbol on Yahoo! Finance, downloads the historical data, and then plots the price history for the specified ticker symbol. I know the exact URL that I need to acquire the data, and if the user inputs an existing ticker symbol (or at least one with data on Yahoo! Financ...

jQuery US Currency validation regEx to allow whole numbers as well

I have this regex working but now need to allow numbers without the decimal as well // Validate for 2 decimal for money jQuery.validator.addMethod("decimalTwo", function(value, element) { return this.optional(element) || /^(\d{1,3})(\.\d{2})$/.test(value); }, "Must be in US currency format 0.99"); Currently this forces the user to...

Is there a URL validator on .Net?

Is there a method to validate URLs in .Net (or ASP.Net, or ASP.Net MVC)? ...

Seting up NHibernate Validator with Spring.net

How can I setup NHibernate Validator with Spring.net as IoC? I am already using Spring.net integration with NHibernate and can't get AutoRegisterListeners to work. What I need is to setup NHV to validate entities automatically upon Update/Save instead of having to call Validate method every time and use Spring.net with ISharedEnginePr...

How do I validate XHTML, ATOM, and CSS in Ruby?

I'd like to run validations on the static web content I'm creating. Are there any good validators for XHTML, ATOM, and CSS? (The first two would be covered by any general-purpose XML-DTD validator.) Later I failed to specify that I wanted local validation, not something that uses the W3C service. ...

How do I tell libxml-ruby about external entity files?

I'm trying to validate using libxml-ruby's DTD#validate, but I keep getting the following warnings: Warning: failed to load external entity "xhtml-lat1.ent" at :29. Warning: failed to load external entity "xhtml-symbol.ent" at :34. Warning: failed to load external entity "xhtml-special.ent" at :39. I wouldn't mind, except I use things...

jQuery validation errorPlacement and removing elements?

Ok, I've tried a few things, but I'm stuck here... Here's the HTML I'm working with: <div class="required"> <label for="paysys_idworldpay" class="labelRadio"> <input type="radio" value="worldpay" name="paysys_id" id="paysys_idworldpay" class="inputRadio"/> <b>WorldPay</b></label> <label for="paysys_idoffline" class="labelRadio"> <input...

Using JQuery Validate Plugin to validate multiple form fields with identical names

I have a dynamically generated form with input fields with the same name (for example: "map"). I do not have the option of changing the field names or generating unique field names because the form handler code (Perl/CGI) is designed to handle an array of input values (in this case @map). How can I use the JQuery Validate Plugin to val...

Jquery Validation Plugin - can you enable "eager" validation from the options?

I'm using the Jquery Validation plugin on a project. By default, the plugin validates input when the submit button is clicked. The behavior is "lazy" in order to be unobtrusive to the user. If an error is found, the validation then becomes "eager" and validates input as the user corrects the offending entries. Is there any way to overr...

ASP.Net: Is it possible to skip databinding of an element if an error occurs?

Hey everyone, I use a lot of repeaters for different elements of our sites, and I've always wondered if there was a way to have the repeater skip an element if an exception occurs instead of having the whole page crash? In particular, I've inherited a system from another developer that using a similar design, however he didn't include ...

accepts_nested_attributes_for child association validation failing

Hi all, I'm using accepts_nested_attributes_for in one of my Rails models, and I want to save the children after creating the parent. The form works perfectly, but the validation is failing. For simplicity's sake imagine the following: class Project < ActiveRecord::Base has_many :tasks accepts_nested_attributes_for :tasks end clas...