I'm using nhibernate validator in my current solution. Everythings is almost fine but...
My view model has a property of type Gender (see example below)
public virtual Gender Gender { get; set; }
public enum Gender
{
Female = 1, Male = 2
}
Now i like to have some validation to ensure that the gender property ist set. But n...
I am using databinding and IDataErrorInfo style validation in a form. This form includes a Label control for which I don't want to show the red adornment when validation fails. Can anyone recommend a way to remove this adornment from Label controls?
...
I'm using RSV to validate form element, and tinymce to convert textarea to editor.
The textarea is included to be checked by rsv validator using 'required', since the textarea is being converted to tinymce editor. Theres a problem on the validation, even i entered the value in the editor the validator says that textarea is a null.
How ...
Hi,
The real question: Is there a way to clear certain attributes for all components on an initial page load?
Background info:
In my application, I have a JSF 2.0 frontend layer that speaks to a service layer (the service layer is made up of Spring beans that get injected to the managed beans).
The service layer does its own validati...
Hello,
I have an object called User where I save all the data of the User. I have some annotations to perform validation and it works fine.
public class User{
@NotEmpty
@Email
@Size(max=100)
@Column(name="username", length=100, nullable=false, unique=true)
private String username;
@NotEmpty
@Size(min=5, max...
Hello,
I need to create a custom constraint annotation which can access the value of another field of my bean. I'll use this annotation to validate the field because it depends on the value of the other but the way I define it the compiler says "The value for annotation attribute" of my field "must be a constant expression".
I've defin...
I've got an enum defined as such:
Private Enum AllowedMonthNumbers
_1
_2
_3
_4
_5
_6
_7
_8
_9
_10
_11
_12
End Enum
Then a property validator defined as:
<TypeConversionValidator(GetType(Int32), MessageTemplate:="Card expiry month must be numeric.", Ruleset:="CreditCard")> _
<EnumConver...
I'm using the jQuery jstree plugin (http://jstree.com) in a ASP.NET MVC 2 project on .NET 4 RC, and running on IIS 7.5. It comes with some stylesheets with inline images with data urls, like this:
.tree-checkbox ul {
background-image:url(data:image/gif;base64,R0lGODlhAgACAIAAAB4dGf///yH5BAEAAAEALAAAAAACAAIAAAICRF4AOw==);
}
Now,...
I have a problem.
The client is claiming that a prize signup form I built for them is not working in IE 7.
It works in IE 8 just fine which they agree about, but in IE 7 it doesn't. (luckily they don't care about IE 6).
I was hoping someone could help me debug it since I don't have access to a machine with IE 7 (I work on a Mac).
The pag...
Hi,
Is it safe to query with object.get without escaping or validation user submitted value?
For example:
some_var = request.POST.get('some_key')
obj = MyModel.objects.get(name=some_var)
Can the user submit malicious data?
Thanks
...
Inherited properties and MetadataType does not seem to work with client side validation in ASP.NET MVC 2.
The validation of our MetadataTypes work as expected on the server but for some reason it does not generate the appropriate client scripts for it. Client side validation kicks in as expected for properties with the DataAnnotations a...
I've recently read about the model validation capabilities of ASP.NET MVC which are all very cool until a certain point. What happens if the application doesn't know the data that it works with because it is all stored in DB and built together at runtime. Just like in Drupal, I'd like to be able to define custom types at runtime, and ass...
Hi,
I have a reacurring problem. I code nice standards compliant code only to have it fail due to ampersands within some of the hyperlink urls.
Does anyone know of a work around or hack for this.
Thanks
...
Hi guys,
Is there any way to turn the damned error provider off when i try to close the form using the windows close button(X). It fires the validation and the user has to fill all the fields before he can close the form..this will be a usability issue because many tend to close the form using the (X) button.
i have placed a button for...
Hello, I'm going to be messing with some stuff at the raw HTTP level during the next few days and I'd like to make sure I'm following the standard as close as possible. Are there any tools out there to validate the HTTP responses that my server puts out to make sure they conform to the specification?
...
Hello,
I have plain POCO's here and as INotifyPropertyChanged is a Interface for the View's need its implemented in the ViewModel not the Model.
Now I want to show validation errors in the View beside every textbox the user typed in data.
I do not want to implemented the IDataErrorInfo interface in my Models because lets assume I am n...
Absolute newbie question, any help is highly appreciated :)
I am using curvycorners (http://www.curvycorners.net/) in combination with the jQuery validation plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/), and I'm having problems getting the div to redraw the rounded corners when I do like this:
$("input[type='s...
Ok, I'm lost. I am required to figure out how to validate an integer, but for some stupid reason, I can't use the Try-Catch method. I know this is the easiest way and so all the solutions on the internet are using it.
I'm writing in Java.
The deal is this, I need someone to put in an numerical ID and String name. If either one of the...
Hi,
I do the validation through configuration files.
But, RegexValidator does not work properly.
This Validator not disciplined even to unknown regular expression!!
For example, if I add a RegexValidator to field with regular expression '\d', It allow also Letters. it validate only first Character.
Also, if I set more than 15 Characte...
Hi,
Just starting with ASP.Net MVC and have hit a bit of a snag regarding validation messages.
I've a custom validation attribute assigned to my class validate several properties on my model.
When this validation fails, we'd like the error message to contain XHTML mark-up, including a link to help page, (this was done in the original W...