validator

Ajax method within an added method in jQuery validator

Hi, I'm kind of stuck with this pretty simple (I'm sure) jQuery/Javascript issue. Here's the code : jQuery.validator.addMethod("emailExists", function(value, element, param) { var email = value || ''; var valid = 0; $.ajax({ type: "POST", url: param, data: "email=" + email, success: function(msg) { if (msg != '' ...

How to fire an event on error in jquery validator plugin

I have jquery validator running and I the page is so long, so I want the page to scroll up to the top because I display errors on the very top of the page above the form, doesn anyone know where I can put the code for the animation so it fires when the form has errors ? ...

Skip HTML escape in custom label_tag helper in Rail 3

Hi, I have this nice class ErrorFormBuilder that allows me to add the error description near the corresponding field in the form view : class ErrorFormBuilder < ActionView::Helpers::FormBuilder #Adds error message directly inline to a form label #Accepts all the options normall passed to form.label as well as: # :hide_errors...

MVC2 Inline XHTML Validator?

I am attempting to setup http://www.thejoyofcode.com/Validator_Module.aspx on a local MVC2 project. I have followed all of the steps listed in the setup guide but I cannot get the validator to kick in. If I create a bog standard .htm file or a webform with .aspx extension, I can get it to work. Anyone had any joy with this? ...

Regular Expression; Find whether a line contains any word with more than X characters.

Hi, I am trying to use a Validator on a ASP.NET site and need to find whether the Street Address textbox contains a valid entry. Entries with words that are longer than X characters (in this case 25, with no punctuation or spaces) will cause the HTML on a printed A4 page to not wrap properly and therefore not to confrom to certain size...

Where is my validator?

I have a validator in my page: <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="IdentifySEDSED1TxtDate" ErrorMessage="Significant Event Date 1 is missing" ValidType="SEDate">*</asp:RequiredFieldValidator> I found that in Page_Load: (below is a screen shot from the Watch Window) this.FindControl("rfv1") {Text...

What is proper RegEx expression for SWIFT codes?

I have to filter user input to on my web ASP.NET page: <asp:TextBox runat="server" ID="recipientBankIDTextBox" MaxLength="11" /> <asp:RegularExpressionValidator runat="server" ValidationExpression="?" ControlToValidate="recipientBankIDTextBox" ErrorMessage="*" /> As far is I know SWIFT code must contain 5 or 6 letters and other symbol...

Regular Expression Validator does not validate empty textbox

I would like to validate the textbox for specific text and it must not be blank. But the regular expression validator is not validating if the text box is BLANK. However, it validates if I type something in the text box. How can I make regular expression to trigger even if the text box is empty? Should I use Required Validator + ...

JQuery Validation Plugin: remote method data issue

I'm using the jquery validation control remote method to test if an email address already exists in the database. Everything works fine the first time validation fires. However, on subsequent validations, the data being passed to the web service is the old data and not the new data entered into the textbox. e.g. An email address is ty...

Validate with Zend_Validate_Date on a time string.

Hey all I'm trying to validate a 'time' field using Zend Framework. The docs seem to be pointing out that the following: $tstarttime = $form->createElement('text','t_start_time'); $tstarttime->setRequired(true) ->setLabel('Start Time') ->addValidator(new Zend_Validate_Date('H:i')); I've tried this but no luck. Any ideas or a...

Regex Syntax Validator

Hi. Does anybody know any tool for validating the syntax of an Regular Expression? I dont want to validate if it matches or not with some text but I want to see if there are syntax errors in the regex (missing parenthisis etc). Also, what about syntax highlighting? It would be a great help when writing complex regex. ...

Custom validator with attributes in facelets

I have written a custom Validator that expects an attribute to be set. I know I have to write a Handler (TagHandler or ValidatorHandler?) to set that attribute, but I am having trouble doing it. <tag> <tag-name>validateCustom</tag-name> <validator> <validator-id>package.CUSTOM_VALIDATOR</validator-id> </validator> </...

System call to get serial number of machine in linux (programmed in java)

I know this is a long shot but is there any way of getting the serial number or uniquely identifiable piece of information in linux? If so how can this be programmed into a Java program? In context, I need to build a license validator that locks down to one machine, if you have any other suggestions they are welcome. Thanks in advanc...

How do you link to a route inside a Symfony form class?

How do you insert a link_to into the 'invalid' message of a regular Symfony form? My form extends the sfGuardUserForm: class SignupForm extends sfGuardUserForm { public function configure() { ... new sfValidatorPropelUnique(array('model' => 'sfGuardUserProfile', 'column' => array('email')), array('invalid' => 'This email a...

jquery validation plugin - removing validation error on specific element on the fly

hi all, i have come up with a semi-solution to this issue, but wondering if there might be a better way. i am currently running the query validator plugin on a group of inputs and all works fine normally. my issue is i am doing an additional check via an ajax post on one of the inputs to make sure the username is unique before submiting...

Eclipse SWT - WizardPage widgets validation

What is the best way to validate Text, Combo and any other SWT widget included in Eclipse Wizard? Recently, I got into a project in which there are many different wizards. I tried to add FocusListeners, ModifyListeners etc. however the size of code and it's complexity was not what I expected. Let's say there are two Text elements in Wi...

Need help in epub validation in php

Hi Friend, I saw your reply regarding epub validator in some site. I am an absolute newbie in this field. Every where I got the link http://code.google.com/p/epubcheck/ , but i don't know how to use the downloaded files from there. Do you can give me a helping hand. My requirement is to how to do validate ePub file in php using same t...

Regular Expression validator with file upload control (asp.net) does not work in FireFox

I am using Regular Expression validator with file upload (Asp.Net) control in-order to restrict the files uploaded. My regular expression is as follows: ^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.wmv|.avi|.mpeg|.MPEG|.mp4|.MP4|.flv|.f4v)$ It gives error message of the validator even after uploading the right file in Firefox. But it ...

How to override the error message parameter in a JQuery validator parameters variable?

I am using this method to add a method to the JQuery validator. I'd like to know how to modify the parameters variable to change the error message. Has anyone done this? (function ($) { $.validator.addMethod('requiredwhencontains', function (value, element, parameters) { var id = '#' + parameters['dependentProperty']; ...

How do I install OpenSP 1.5.2, the SGML (and XML) parser for w3c local validator on windows?

How do I install OpenSP 1.5.2, the SGML (and XML) parser for w3c local validator on windows? ...