validation

Good link checking tool?

Hi all Can anyone recommend a good, free link checker to check all pages within a domain? Ideally a browser add-on or a web app (otherwise something that runs on OSX). Crucially it needs to follow links recursively within a domain. Links outside the domain should be followed to a depth of 1, but not checked recursively. This is for th...

Validation on ManyToManyField before Save in Models.py

I have the following models: class Application(models.Model): users = models.ManyToManyField(User, through='Permission') folder = models.ForeignKey(Folder) class Folder(models.Model): company = models.ManyToManyField(Compnay) class UserProfile(models.Model): user = models.OneToOneField(User, related_name='profile') company = mode...

ValidatorEngine.Validate returns null (no error) if configured its ValidatorMode.UseExternal

Hi i am integrating nhibernate validator into my application and and everything is fine with attributes but as soon as I create *.nhv.xml files and move my validation rules there (as embedded resource) ValidatorEngine.Validate(entity) returns wrong (actually nothing and my InvalidValue[] collection is empty I appropriate any comme...

Accessing Errors-object in a Spring Webflow 2.0 test

How do I access the Errors-object created by spring when validation fails from a Spring Webflow 2.0 test (inherits from AbstractXmlFlowExecutionTests)? I tried using the FormObjectAccessor.getCurrentFormErrors() but I couldn't get a reference to the RequestContext. ...

DependencyProperty ValidateValueCallback question

Hello, I added a ValidateValueCallback to a DependencyProperty called A. Now in the validate callback, A shall be compared to the value of a DependencyProperty called B. But how to access the value of B in the static ValidateValueCallback method validateValue(object value)? Thanks for any hint! Sample code: class ValidateTest : Depend...

MVC 2, Custom ModelBinder, and storing the "attempted value" for the view

I have an object that was previously round-tripping from the server to the client and back nicely (i.e. edit and view forms worked fine). However, I've added to that object a complex type and made a custom ModelBinder to handle it. The complex type can be represented as a single string but is stored in the object as a Decimal (think "0...

Ruby on Rails when create method fails, render loses local variables

Hey guys I have a simple create method with some validations and whenever the create method fails due to validation errors it re-renders the 'new' action. The problem is in my new action/view I have a local variable that is established in the action and passed to a partial to render some related information to what the user is creating....

jQuery form duplicate email validation on exit

I have a site and I am using this plugin for validation in the registration process. I have seen sites where when you exit the email address field, it goes out and checks to see if the email address exists before you hits the submit button. I know this is ajax but I cannot figure it out. How do you validate if an email address (or a...

Is it safe to validate a URL with a regexp?

In my web app I've got a form field where the user can enter an URL. I'm already doing some preliminary client-side validation and I was wondering if I could use a regexp to validate if the entered string is a valid URL. So, two questions: Is it safe to do this with a regexp? A URL is a complex beast, and just like you shouldn't use a ...

Should we use require_once instead header location?

Hello commnunity, i have somthing like this: (if this page needs the user to be logged) if(!isset($_SESSION['usr_id'])){ //if not a logged user $_SESSION['redir']=curPageURL();//Saving the current page for the redirection header('Location: ../Session/loginFrm.php'); } and in loginFrm.php, we do: {...after validation...

reCaptcha accepts wrong answers sometimes

We are using recaptcha ASP.NET control: http://recaptcha.net/plugins/aspnet/ However, we find that in some situations, recaptcha accepts answers which are clearly wrong. For example, recaptcha provided these words: of purser The tester typed in the following: o purser ..but Page.IsValid returned true! Is this a known issue...

How to register XHTML namespaces??

My page use to validate for XHTML but I added the addthis buttons to page and it gives a new namespace: E.G.: <a addthis:url="http://domain.tld/path/to/stuff" addthis:title="Teh Title here"> I tried: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:addthis="http://addthis.com/" lang="en"> Doesn't work. Can we register namespac...

asp.net mvc validation message occured

Hello to everyone Please help I have below classes [Bind(Exclude = "Id")] public class Account { public Account() { User = new User {Account = this}; UserDetails = new UserDetails {Account = this}; } public virtual int Id { get; private set; } public virtual User User { get; set; } public virtual...

How to do server-side validation using Jqgrid?

Hi, I'm using jqgrid to display a list of sites and I want to do some server side validation when a site is added or edited. (Form editing rather than inline. Validation needs to be server side for various reasons I won't go into.) I thought the best way would be to check the data via an ajax request when the beforeSubmit event is trig...

Is there a way to avoid throwing/catching exceptions when validating Textboxes used for number entry?

Hey all, In the pursuit of elegant coding, I'd like to avoid having to catch an exception that I know well may be thrown when I try to validate that the Text field of a Textbox is an integer. I'm looking for something similar to the TryGetValue for Dictionary, but the Convert class doesn't seem to have anything to offer except exception...

Context dependent validation

I would like to be able to validate an object in different contexts using DataAnnotations in .NET 4. For example: If I have a class with these annotated properties [Required] public string Name { get; set; } [Required] public string PhoneNumber { get; set; } [Required] public string Address { get; set; } I would like to be able to ...

C++: Validate a pointer?

Possible Duplicate: Testing pointers for validity (C/C++) If I have a pointer, like char* foo, is there any way to determine if foo points to a valid location in memory? (So, foo is not NULL, and delete has not yet been called on it.) ...

WPF Control validation

Hi all, I'm developing a WPF GUI framework and have had bad experiences with two way binding and lots of un-needed events being fire(mainly in Flex) so I have gone down the route of having bindings (string that represent object paths) in my controls. When a view is requested to be displayed the controller loads the view, and gets the n...

Can anyone help me with this javascript for validating url in aspx?

Here's my code - function Validate_URL(url) { var iurl = url.value; var v = new RegExp(); v.compile("/^(((ht|f){1}(tp:[/][/]){1})|((www.){1}))[-a-zA-Z0-9@:%_\+.~#?&//=]+$/;"); if (!v.test(iurl.value)) { url.style.backgroundColor = 'yellow'; } return true; } no matter what i put in url...

codeigniter form_validation is not working...(for me)

Ok, I'm trying to validate a form in codeigniter as a first step I want to make all fields in my form required to make an entry... but I can't make it work here is the code: myBlog.php <?php class MyBlog extends Controller{ function MyBlog(){ parent::Controller(); $this->load->helper('url'); //...