Using xVal with Jquery validation and would like the error messages to be shown underneath the field rather than besides it. Is this possible?
Also, is it possible to instruct xVal to simply show a "*" next to the field and then show the actual error message in a tooltip and/or summary above the form?
Thanks
...
I downloaded the xVal sample project from Steve Sanderson’s blog, run it, and the sever side validation it's working (after i click submit), but the client side doesn't;
although i looked at the source and saw the generated javascript
<script type="text/javascript">xVal.AttachValidator("booking", {"Fields":[{"FieldName":"ClientName","F...
Microsoft JScript runtime error: 'this.Plugins[...]' is null or not an object
coming from this code:
var xVal = xVal || {
Plugins: {},
AttachValidator: function(elementPrefix, rulesConfig, pluginName) {
if (pluginName != null)
this.Plugins[pluginName].AttachValidator(elementPrefix, rulesConfig);
else...
i have an asp.net mvc project with xval and data annotations and i need to switch to nhibernate validation
with data annotations i had an DataAnnotationsValidationRunner and i was doing something like this
var errors = DataAnnotationsValidationRunner.GetErrors(this).ToList();
if(errors.Any())
throw new Ru...
Description
My solution has these projects:
DAL = Modified Entity Framework
DTO = Data Transfer objects that are able to validate themselves
BL = Business Layer Services
WEB = presentation Asp.net MVC application
DAL, BL and WEB all reference DTO which is great.
The process usually executes this way:
A web request is made to the W...
I can't get xVal validation to work with strongly typed viewmodels.
Every method in xVal seems to want a prefix which is not used when dealing with strongly typed viewmodels.
My view contains code similar to this:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ContactForm>...
I have a textbox..
<input id="state" name="state" type="text" value="" />
And I'm trying to add a remote rule to it.
<%= Html.ClientSideValidations()
.AddRule("state", new RemoteRule(Url.Action("ValidateNeedForState")))%>
In that remote action I want to see if the country is "US" and if so, make sure there is a state provided. ...
My view:
/User/EditUserName/2/me
<viewdata model="EditUserNameViewData" />
<form action="~/User/EditUserName" method="post" class="span-15 last">
!{Html.TextBox("newUserName")}
<Submit id='"chooseNewName"' value='"Choose new name"' />
</form>
Controller actions:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult EditUserName(int id)...
I have a requirement that the validation error messages that are passed to my view come from the database.
I want to use data annotation on my model but the error message key in validation attributes can only be a string or a constant.
I'm open to other solutions for validation but I need to pull the error messages from the database. ...
Hi,
I have been evaluating xVal as framework for validating Entities in the ASP.Net MVC Framework. I have recently discovered that each time a validation rule is broken, xVal cause an excpetion to be thrown. To me is seems incorrect. For example, when a user fills in a form, and forgets to fill three required fields , three exceptions w...
I have a simple form. Its got one field and a submit button.
I hide the submit button. The submit button is actually triggered with an anchor
tag that calls a javascript method that uses jQuery to get the element and execute
a click(). This works fine, the form posts and record is successfully written into the DB.
So now I added xVal fo...
I have a table name Discount that has the following schema:
PK DiscountID int
FK CustomerID int
Amount money
Name varchar(50)
So I am displaying all the discounts related to the customer. Each customer will have 3 discount records.
When I generate the form the ID's and Name's of the associated textboxes for editing that have to be ...
Over the last 24 hours, I've become greatly enamored of xVal. I introduced it into my personal web site, and it works like a champ--I can't believe how easy it was to get it going. I'm using ASP.Net MVC, xVal 1.0, and the DataAnnotations validators.
Now trying to put this same code into a work application, I'm seeing different behavio...
Hi,
I have a form for create/edit articles. Every article is associated with an user.
After article is publshed the link to each article is composed from user name and article title (and {userName}/{articleTitle} should be unique combination):
/articles/{userName}/{articleTitle}
Article class:
public class Article
{
public int...
I'm trying to use xVal to validate the registration of a new user. I've ran into a buzz saw when trying to implement the logic that checks to see if the user name that the new user is trying to register with is already taken. I can't seem to find a way to accomplish this without having my User entity have a dependence on my UsersReposito...
Hi,
I do have three text box, where all are required field. which is tightly coupled with a model
Name* :
Age* :
Check Button
Date* : //This is a hidden filed
Continue Button
When i click on continue button all the validation error messages will get displayed.
i am entering the Name and Age then click on Continue. then the validatio...
i wanna fire a JavaScript function when clicked on a button.
This JavaScript should fire only after the page does the xval validation.
...
I'm using the wonderful xVal library for setting up client side validation of rules defined server side in ASP.NET MVC.
In my implementation I need buddy classes since I'm extending classes already defined by entity framework. (I recognize that MVC2 may make all this moot, but I'm staying in MVC1 until 2 goes live).
The DataAnnota...
Im using MVC data annotation with xVal Client Validation on a form. How do I implement something like the a asp.net validation callout extender instead of display red error messages.
...
I've been doing some development using the xVal framework for .NET to link up some of the validation rules for models on the server side along with some client side validation using the jQuery Validation plugin along with the jQuery Form plugin for submitting the form.
The scenario is the following:
Allow the client to perform basic v...