validation

How to set generic dependency properties of validation rules in WPF?

The background Maybe it is not necessary, but I am afraid that single line question would be too complex. So... I had min-max generic range validator (RangeValidator), because XAML does not work with generic classes I created simple derivative IntRangeValidator which would set int as generic type, because in current case I need validat...

Custom validation not working with delete buttons?

In a ListView, I have a CustomValidator set up to validate a field whenever a button with CommandName="Delete" is clicked. <ItemTemplate> <asp:TextBox ID="NameTextBox" Text=<%# Eval("Name") %> runat="server" /> <asp:Button ID="DeleteButton" Text="Delete" CommandName="Delete" ValidationGroup="Delete" runat="server" /> <asp:C...

Image URL validation in C#

Hi, How can i check if my image link is valid for both IE and FF? For example this link works just in FF, no image is displayed in IE browser. I checked the image and the color space is RGB. So image space problem is excluded. Thanks. ...

JQuery validation : How to check items in multiple select

I have a form using JQuery validation plugin. <label> <input name="Distribution[]" type="checkbox" id="dist_europe" class="required minlength:1" value="Europe" /> Europe </label> <select name="Europe[]" size="5" multiple id="Europe"> <option value='Albania'>Albania</option> <option value='Andorra'>Andorra</option> <optio...

Rails validating virtual attributes.

I this model: class Bunny < ActiveRecord::Base attr_accessor :number validates_presence_of :number validates_numericality_of :number end Whenever I submit a form to create this model I get the following error: undefined method `number_before_type_cast' for #<Bunny:0x103624338> ...

Validation of existence per result on a indexed list, mysql/php

We have a directory system that lists people with their credentials such as email phone and etc Their web profile link is also listed. but this link is created by taking the email username and adding it to a link. so [email protected] has a profile page at school.com/user/joe01 currently there is no validation to check if the actual user...

MVC2, EF4, layers, STE and validation

I see that most of people interested in EF4 are MVC developers. So; for a MVC2 medium application that implements DDD (Interfaces, Repositories, Services, Entities and IoC): Do you recomend separating the different concerns in layers and using Self Tracking Entities? (here I know that ObjectChangeTracker is not being used but I don't f...

Creative account confirmation without the use of emails

I employ email validation to grant people full use of the site. The trouble is, sometimes these emails get spam-boxed, or never arrive, so I get many people complaining that they cannot confirm their account. Was wondering if there are other (creative) ways to offer secondary validation option to users who didnt get the validation. Its ...

Can ASP.NET validation controls display an exclamation point with tooltip message?

Can the standard ASP.NET Visual Studio validation controls display an icon with a tool tip message instead of text, the way the WinForms ErrorProvider controls work? If not, is the AjaxToolkit's ValidatorCallout control the best approach? Is this control flakey? ...

ASP.NET MVC (2) Data Annotation Validation and UpdateModel<T> (C#)

So, if I want to add a new object to my database, I can write this: public ActionResult Something(SomeObject Object) { if (ModelState.IsValid()) { DataContext.SomeObjects.InsertOnSubmit(Object); DataContext.SubmitChanges(); }; } But, how does validation get called when I want to update an object? Does UpdateMod...

jQuery Validate: Not default value

I have a category dropdown selection element in my form. The form is validated with jQuery as follows: $('#myForm').validate({ rules: { text: { required: true }, category: { required: true } }, messages: { text: { required: "Text required" ...

How to validate dynamic fields using jquery validation plugin ?

Hello, I am trying to validate a form using the jquery validation plugin. It's usually pretty easy but this time I'm using dynamic field. The new fields are not being checked so I tryed to remove the validator then to recreate it but It's doesnt seem to work. $j("#add").click(function(){ $j("#lignes").append($j(".ligne_vide:l...

Validating content of the attributes to not be the same

Hey everybody, I am trying to write a unit testing for a User model in Ruby on Rails. I am using authlogic and need to check that the first_name and last_name of the user model attributes are not the same when the user is registering. This is my user model: class User < ActiveRecord::Base acts_as_authentic do |c| c.login_field= ...

Validators and ClientIDMode issue (ASP.NET)

ASP.NET 4.0 has introduced the property 'ClientIDMode', which allows one to specify how the html element's ids are rendered in the output html. My project is currently set to 'Static' (the shortest / contains no hierarchy id's) When using any validator (RequiredFieldValidator, RegularExpressionValidator...), unless the control it's val...

Jquery Validation: Call Valid without displaying errors?

Hi, Using JQuery Validation plugin, I am trying to call the .valid() method without the side-effects of displaying error messages on screen. I have tried a number of scenarios with no success, my latest being: $('#signup').validate({ showErrors: function() { return; }, errorElement: "", errorClass: "...

h:inputText does not reRender label on Validation

Hi, I am running into a peculiar problem when I am trying to invoke h:inputText label field value on validation. It only works when I pass a static value to label field. The time I pass a dynamic value to it, it fails to render the label when some validation fails for that field. <h:inputText id="fullNameField" value="#{newUserFormBean...

Which controls triggered the Page.IsValid = false?

Two things: A) Is it possible to set the Page.IsValid (Is_Valid) property through Jquery so that I dont have to use the aspx validators? It is my understanding that the IsValid property is read-only? B) When the validators are in, is it possible to find out, through Jquery (ofcourse) which controls caused the validation to fail? An exa...

jQuery Autocomplete Validation - How to make a selection required?

I'm using jQuery autocomplete on a text box so the user can select a trade. I need to make this a required field. I'm also using jQuery Validation. Here's my autocomplete cpde: $(\"#trade\").autocomplete({ source: " . $tradeString . ", maxHeight:100, autoFill: true, minLength: 3, close: function() { $(\"#form\").val...

Silverlight Validation Not Working with Data Annotations

I have a form: <StackPanel x:Name="LayoutRoot"> <sdk:ValidationSummary /> <sdk:Label Target="{Binding ElementName=Greeting}" /> <TextBox x:Name="Greeting" Text="{Binding Greeting, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> <sdk:Label Target="{Binding ElementName=Name}" /> <Te...

Programmatically show asp:RequiredFieldValidator.

I have a form. I am validating user input on client side and server side in case if any naughty user bypasses client side validation. I am using asp.net's RequiredFieldValidators. I have set them to dynamic. They display fine on client side if form fails validation. But if I try to bypass client side validation, they never show up, even ...