I am using xVal combind with the jquery.validate plugin, but have come across a slight problem in that it is posting validation messages twice in a certain instance. I think this bug should be fairly easily fixed with some clever jQuery in the placement of the error message.
I am trying to find a way to see if a ul already contains an l...
I have a complete validation on an obeject and am trying to figure out the best way to handle it.
Given the following class:
public class LetterResponse {
public Guid Id {get;set;}
public bool SendBlankCart {get;set;}
public string ToName {get;set;}
public string ToAddress {get;set;}
}
I want to use a dataannotation and xval in o...
I'm trying to figure out the best way to validate data within a MVC C# app and xVal seemed to be the best fit. However I'm running into a problem with data type validation.
At first I was doing an UpdateModel into the DTO and then running the validation on the DTO. This worked great for things like required fields, however UpdateModel...
I'm using xVal in my ASP.NET MVC application, which is great in general. Following Steve Sanderson's blog post, I created a DataAnnotationsValidationRunner to do server-side validation of attributed objects. This works great for a simple class. e.g. Person:
public static class DataAnnotationsValidationRunner
{
public static IEnume...
Hi:
I have an MVC app using xVal. I am trying to hook into the jquery validation to show a "loading" graphic once the form is valid. I cannot seem to find a way to only show the qraphic when jquery has validated the form.
However, it also disables the button when the button is clicked and is NOT validated stopping the user from re-subm...
Does anyone have any recommendations for either of these validation ASP.Net MVC Validation frameworks?
xVal
MVC Validator Toolkit
...
I'm using xVal with MVC and jquery validate. It all works nicely, until i get to my custom validator that does an ajax call.
the ajax call returns the right value, according to the firbug Net Tab. But something is going wrong and I can't figure it out.
Here's the javascript code:
function CheckEmail() {
var res;
$.a...
I have an ASP.NET MVC Project working with NHibernate and NHibernate.Validator and i'd like to use xVal 1.0 (most recent release).
I Added the requested scripts to the project and referenced it in Site.Master:
<script type="text/javascript" src="<%= ResolveUrl("~/Scripts/jquery-1.3.2.js")%>"></script>
<script type="text/javascri...
Hi there
I'm not sure if my issue is more general or only xVal specific.
At the moment I have a form with an undefined list of partial forms Something like this. There I load a partial form with Ajax, with xVal I attach also a validator.
My problem now is that the rendered form is not validated until a postback.
Is there any possibil...
I have a jQuery autocomplete fild which gets existing data from my MVC action. I want to ensure that the data entered into the field DOES NOT already exist on the database.
I had thisworkig using .result and .change on the autocomplete to set the field to class = "input-validation-error". When I added xVal client validation this still w...
How can I provide some form of Attribute against my Business Objects in my ASP.Net MVC application so that I can pick up the help texts in the View and have them appear as pop-up hover help texts like this:
<%= Html.TextBox("PostalCode", Model.PostalCode, new {
title = "Please enter your postal code." })%>
I want to be able to g...
I'm sort of thinking out loud here, so let me know if I need to clarify...
on ajax heavy sites, when using JsonResult to pass information back to the client, what techniques, patterns, best practices are being used to pass ModelState validation errors back to the client?
I am using xVal and castle validation on my view models, is there...
I saw a similar post that was trying to do this same thing with the Dinner example, but he fixed his issue mine seems to be a little deeper. Basically I cxan get the validation to work just fine but it only works in Firefox. In IE7 when the page loads, I immediately get an alert box with the following message: "Error: Element title is no...
Hello,
There is a plenty of very good post and explanations how to implement validation with ASP.NET MVC, and I prefer one of these:
xVal
Validation with Service layer
Data Annotation attributes
However, I really like to call ActionMethods via jquery $.ajax method. One of the reasons why I want to use $.ajax is because there will be...
Hi,
I'm trying to decide what validation approach to take for a new ASP.NET MVC project. (And wow there are plenty of options!)
The project uses NHibernate, so the first thing I considered was the NHibernate Validator (Because of tight integration with NHibernate). However, as far as I can see there are only a couple of benefits to th...
I have a problem on submitting an asp.net mvc form that is using Xval for validation and uses TinyMce as an editor on two text areas.
The TinyMce editor is initialized with the new tinymce jquery plugin and the form validation and submission works perfectly if I remove the editor.
But if I initialize the editor the form is submitte...
I am using AjaxSubmit to post a form and there are server side validations done using XVal (RuleException way). I am not using the try/catch way to add error to Model and then send to view. Instead - I want to use the HandleError attibute and in the OnException I am adding the errors to Model. The major problem is how do I get those erro...
how to append error messages on validation summary through javascript.
i have added a validation summary, click on check button need to validate the credit card and retrieve the information back to the user, if the card is invalid i need to display that message in the validation summary.
how can i do that? is there any way to programatic...
I'm having some problems with xVal's clientside validation when it comes to dates. I can't get it to work with a swedish date format which is yyyy-mm-dd, it only seems to work with mm/dd/yyyy. Is there a way to make it work with other date formats?
...
I am using NHibernate Validation with external definitions (that is not using attributes on classes, implementing validation by inheriting from ValidationDef<>)
I am using the RulesProvider from here as I am using NHV 1.2
I am trying to get client side validation working in xVal. But because the validation does not come from the attrib...