validate

Validating entered user data

Hello, this is a general question but I do a desktop application. Should I check for example the firstname exceeding 50 chars or is this a matter of taste? Or should I check for > 50 chars because the user could flood my database with 10000000 chars ? EDIT: Seems I made the ball rolling... I should have said, that the firstname/last...

Check on every page to ensure user has validated as being over 18

Hi Guys and Girls. I'm working on a website (tobacco related) that requires all visitors to validate they are over 18 before they can view the site. I have a form in place that validates the age but I'm at a dead end. How can I use this to store a cookie that they've passed the test and do a check on all pages to see if this check has al...

How to parse SQL files using C# ?

Hi, Can anyone please help me? I am having bunch of .sql files. I want to parse (validate) those files before executing them on server. I have many online sites which parse the code. But I want to parse the code using C#. So please can you guide. If there is any tool, dll I need to use. I just want to parse the file and not execute...

Validate login page in Twitter in iPhone

Hi, I am woking on twitter application. I have used "Twitter Request" package and implemented in my application and posted a tweet messages successfully. Now i want to validate the login page, whether the user typed the user name and pass word is correct or not. If the user types the correct datails, the message will be posted otherwise...

Can't send flash message from Model method

Hello, I'm trying to prevent a record that has a relationship to another record from being deleted. I can stop the deletion but not send a flash message as I had hoped! class Purchaseitem < ActiveRecord::Base before_destroy :check_if_ingredient ... def check_if_ingredient i = Ingredient.find(:all, :conditions => "purchaseite...

jQuery Validation Plug-in With BeautyTips

hey folks, I'm looking to incorporate the jQuery.validation plugin into a project I'm working on and wondering if anyone knows of a way to display the error messages using BeautyTips. Somthing along the lines of this: $("#myForm" ).validate({ onfocusout: false, onkeyup: false, showErrors: function(errorMap, errorList) { ...

this.optional() in jQuery validation method doesn't seem to work

Hello, I've got a little problem here. I've got the following rule for one of my fields: StartDate: { required: isDelayed, dateRU: true } isDelayed() returns false, so I guess StartDate field should be optional. However if I check it inside my dateRU method: $.validator.addMethod( "dateRU", function(value, element) { ...

Call to `validate` inside a custom validator

I have a model, Card, with multiple subclasses through single table inheritance. I have another model, CardSet, with multiple subclasses through single table inheritance. Cards have many CardSets, and CardSets have many Cards, both through Memberships. Given that a class FooCard is a subclass of Card, and class FooSet is a subclass of...

convert from javascript to servervalidate in vb.net

this is my javascript code - function ae_Validate(sender, args) { var cbs = document.getElementsByTagName('input'); args.IsValid = true; for (i = 0; i < cbs.length; i++) { if (cbs[i].type != 'checkbox') continue; if (!cbs[i].checked) continue; var price = document.getElement...

How to connect Flash Builder 4 application to the remote mySQL database?

I want to get data from a database of my site. In the setting of the project point out Root URL: http://...:** But what to set in Root folder? Already tried the two dozen variants and Validate location does not work. ...

How to validate recaptcha_tag with jQuery Validate?

I'm using jQuery validate for a contact form: $(document).ready(function(){ $("#contactFormid").validate(); }); and i'm using this rails plugin to generate recaptcha on my page recaptcha_tags :public_key => 'xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxx' , :display=>{:theme=>"white" } how do i get jquery validate...

How to debug Validate(...) function at server side?

I am using wsHttpBinding with custom username authentication. Thus, I had override Validate(string userName, string password) function of the UserNamePasswordValidator class. My Validate(...) like this: public override void Validate(string userName, string password) { if (userName.Equals(string.Empty) || password.Equals(stri...

Check for valid link (URL)

I was reading though this other question which has some really good regex's for the job but as far as I can see non of them work with BASH commands as BASH commands don't support such complex rexeg's. if echo "http://www.google.com/test/link.php" | grep -q '(https?|ftp|file)://[-A-Z0-9\+&@#/%?=~_|!:,.;]*[-A-Z0-9\+&@#/%=~_|]'; then ...

Validate JS script block within an HTML file in Eclipse

Is there a way to have eclipse validate javascript within a <script> block on an HTML page? ...

Validate data driven testing

Hi I got the code for getting the data from excel and den using in selenium. My problem is that when i give invalid data in the text boxes those are also getting accepted!! But when i checked by entering those invalid data in the same text box its not accepting ...

Validating a yaml document in python

One of the benefits of XML is being able to validate a document against an XSD. YAML doesn't have this feature, so how can I validate that the YAML document I open is in the format expected by my application? ...

how to write a program to validate another program/script?

How to write a program to test another program/script? I need to test a ruby script that is an echo server; how should I write a program to validate the correct working of the echo server script ? ...

Validate captcha using jquery validation

How can we validate captcha using jquery validation. avoiding post back using ajax? Can anyone please help me on this. Your help would be appreciated. Thank you. ...

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...

jquery charcode error

Hi, i have this simple form validation in jquery: <script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"&gt;&lt;/script&gt; <script type="text/javascript"> window.onload = (function(){ $("#register_form").valid...