validation

How to validate youtube video ids?

I want to validate youtube video ids sbumitted in the URL to one of my sites before accessing the Youtube API, but I don't know what the allowed characters are in such an id. I see people on the net guessing it can contain numbers and characters, but I haven't yet seen an official specification of these video ids. Is there one? ...

MVC2 Validation

My application uses MVC validation explained here: http://blog.stevensanderson.com/2010/01/28/validating-a-variable-length-list-aspnet-mvc-2-style/ And it works fine with both server and client validation when the form is posted. However my problem is that I would like to have client validation on one of the fields before the form is po...

JavaScript and error "end tag for element which is not open"

I have problem with validation such code function show_help_tip(event, element) { var $e = $(element); var pos = $e.offset(); $('.body-balloon',$help_tip_div).html($(' <p>&nbsp;</p> ').html(element.getAttribute('title'))); $help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show(); } end tag for e...

How to perform Spring validation in MultiActionController?

How to perform Spring validation in MultiActionController? ...

[WPF] ExceptionValidationRule doesn't react to exceptions...

Hi, I have an ExceptionValidationRule on my TextBox: <Window.Resources> <Style x:Key="textStyleTextBox" TargetType="TextBox"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Err...

Validation file upload CakePHP

How validate file upload in CakePHP? When i wrote some like this:var $validate = array( 'file' => array( 'select' => array( 'rule' => array('selectFile'), 'message' => 'There is no file!'), 'type' => array( 'rule' => array('typeFile'), 'message' => 'Bad type!'), ...

Displaying untrusted HTML using PHP

I have a read a number of excellent questions and answers today about dealing with user input. I am now using htmlspecialchars() to display user data in the create/edit forms (but accepting the raw input via prepared PDO statements into my database). The main question I know have is, what do you do when you are allowing the user to subm...

Validate HAML from ActiveRecord: scope/controller/helpers for link_to etc?

I like HAML. So much, in fact, that in my first Rails app, which is the usual blog/CMS thing, I want to render the body of my Page model using HAML (obviously I won't do the same for Comment!). So here is app/views/pages/_body.html.haml: .entry-content= Haml::Engine.new(body, :format => :html5).render(self) ...and it works (yay, recur...

Problem with user login validation by authlogic

Hi, I want to use email for signing in, and to allow users to have similar names. One way to do this is to rename login/username field to something different. However, I would prefer to do it just by authlogic settings. I tried the following acts_as_authentic do |c| c.login_field :email c.validate_login_field false c.valida...

Only want "Required field" error to appear ONCE in ASP.NET Validation Summary

I have a form with several fields with a RequiredFieldValidator on them. If any of these fields are not filled in I only want the message "Please enter the items marked with an asterisk" to appear once in the ValidationSummary control and an asterisk to appear next to each missing field. I have done this using the method here. i.e. by...

Disabling WSDL file validation in Zend Studio

Hello, How can I disable WSDL file validation in Zend Studio? I have many WSDL files in a project and it takes much much time to validate all of them. Thank you in advance. ...

VB time input, a better way to do it?

Hello Stack overflow, Working on a handy program for my boss at work as a summer project in between semesters both to make life easier for her, and to practice and improve my skills. Intent is to allow her to quickly and easily calculate the hours and minutes the person worked. The form itself has a series of text boxes for the Clock ...

ASP MVC 2: Regular expression attribute working on clientside but not on serverside

[Required(ErrorMessage = "Date is required")] [RegularExpression(@"^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26...

Check whether a Lilypond (.ly) file is valid with python

Hey, Do you know a pythonic simple way to check whether a Lilypond (.ly) file is valid ? ...

How to find if string contains letters and spaces (php)?

So I need to get value false or true if string contains not only letters of all european and east alphabets and " "(space) and "-" minus. How to do such thing with some $a string? ...

WPF Validation on two properties

I have a user control that contains a border somewhere in it. I am able to edit both the User Control Width and the Border Width from binding to two textboxes. I need to include validation when I create the binding in code so that the Border Width can't be higher than the User Control Width. ...

struts2 validate

In Struts2 you can change the method used for execution for an action by changing the method attribute in the following line: <action name="registerVal" class="cz.vutbr.fit.pishotel.model.action.Register" method="execute"> Is it possible to change the validation method used as well, or is the validate method name hardcoded. ...

Validating made up fields in CakePHP?

Here's my scenario: I'm creating a password change page. the real field that holds the password is User.password On the password create page, I used 3 made up fields: $form->input('User.old_passwd'); $form->input('User.new_passwd'); $form->input('User.confirm_new_passwd'); How do I validate them with the rules: old password must matc...

Asp.Net MVC2 Clientside Validation problem with controls with prefixes

The problem is: when I put 2 controls of the same type on a page I need to specify different prefixes for binding. In this case the validation rules generated right after the form are incorrect. So how to get client validation work for the case?: the page contains: <% Html.RenderPartial(ViewLocations.Shared.PhoneEditPartial, new Ph...

Livevalidation clientside validation - can you control the position of the validation messages?

I'm using LiveValidaion for my clientside validation http://livevalidation.com/ and DataAnnotations for my validation rules. This all works fine except that the clientside error messages are only ever displayed to the right of the element being validated. Is it possible to move this validation message below the element being validated?...