validate

Validate a DateTime in C#

I doubt I am the only one who has come up with this solution, but if you have a better one please post it here. I simply want to leave this question here so I and others can search it later. I needed to tell whether a valid date had been entered into a text box and this is the code that I came up with. I fire this when focus leaves the...

Are Windows DLLs signed by Microsoft? Can I detect if they've been tampered with by a third party?

Hi everyone. I'm implementing a locking and copy protection system for my software. I've shut every hole that would allow someone to break my lock (well, that's a little too optimistic, I know!) but the last thing is this: I hear crackers can change Windows DLLs like Kernel32.dll in a way that the API I use returns a value which is spe...

Ragel - validate a String while Input

Assume we want to validate user input, while user is typing in a JTextField. For validating the user input, I wonder if I could use Ragel. Assume the input should follow this example regex: [a-z]{2,5}ABC[0-9]+ How can I do this with ragel? Can anybody give a short example how to validate user input "on the fly" (while inputing) with...

What is the best way to validate/debug Mathml with free online tools?

Hi there, i have some xml with math ml inside, and i would like to find some free tools preferably online which i can use to validate and if possible even edit math ml. Anyone knows of any good tools which i can use to do this? Thanks. Edit: Does firefox 3.03 natively support MathML? I can't get some equations to show up at all. I kno...

Validating an RSS feed

I'm working on an application that allows users to add their own RSS feeds to a simple reader of sorts. Currently, I'm using xml_domit_rss as the parser but I'm unsure if it's actually validating the URL before parsing. From what I can gather online, it looks as if validating is separate from the parse, either by using a service (feedval...

HTML Validator giving me error on form input type, element not allowed in context

This is the code I have that HTML Validator is giving me an error on: <input type="text" id="search" name="keywords" /> <input type="submit" value="Search" name="Submit" /> Here is a screen shot of error in HTML Validator: http://i39.tinypic.com/mw2m92.png This is the error message I am receiving: The mentioned element is not allowe...

Django and Custom Form validation

I am trying to create a custom form field and validate off it. This is version 1.0 of Django. Here is my form object class UsernameField(forms.CharField): def clean(self, values): print "" Here is how I call it class RegisterForm(forms.Form): username = UsernameField(max_length=30, min_length=4) password = forms.Ch...

ASP.NET 2.0 Membership: ValidateUser not locking out the user?

Hi I am using the default SQLMembershipProvider in my ASP.NET 2.0 website, and expect the Membership.ValidateUser to lock-out the user after entering a number of wrong passwords (5, in my case) but ValidateUser doesn't seem to be caring about keeping count of bad password attempts and locking out the user. What's wrong? The Membership...

Facebook Connect Won't Validate

I'm trying to get my Facebook Connect code to validate, but it won't. I think the problem is that their xmlns page isn't loading. I have the code: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en"> But http://www.facebook.com/2008/fbml isn't found. Does anyone have a cop...

newbie validate xml using xsd

Hi all, I need validate an xml using xsd in .net, my files see next post any help about it ? any sample code source ? Thanks in advance, king regards ...

Using Zend_Filter_Input, are Filters or Validators processed first?

When using Zend_Filter_Input, are Filters or Validators processed first? ...

Using Base SAS to validate Windows Password

We have a signon script that requires a Windows password in order to access and validate against the SAS metadata server. The problem is that if the windows password is changed, and the script is run a few without being updated, then the user gets locked out and has to call IT support for a password reset. What is the simplest way of u...

Setting default value with Params::Validate if an undefined value is passed in

Hi Perl followers. I am having trouble getting Params::Validate to work how I want it to. #!/usr/local/bin/perl -w use strict; use Params::Validate qw/:all/; use Data::Dumper; sub foo { my %args = validate(@_, { bar => { default => 99, # TODO - Somehow use a callback to return a default if undefine...

valid html header

Is there any way to write a valid header/link/image? Something like <a href="index.html"><h1 id="logo">Company name</h1></a> (with an image set as background and the text moved way to the left so its not visible via css) ...

C# library for (x)html compliance

Hi, Curious if anyone has come across a C# library which will clean up invalid html. Basically our CMS has some areas where we allow users to enter in HTML, and invariably this leads to some poorly formatted code. Example - if someone puts in: <div><span>blah blah blah</div> We'd like to rip out any unterminated tags to end up with...

Validating a slug in Django

Hi I'm guessing this is going to involve regexp or something, but I'll give it a shot. At the minute, a user can break a website by typing something similar to £$(*£$(£@$&£($ in the title field, which is converted into a slug using Django slugify. Because none of these characters can be converted, Django returns an error. My question ...

Elegant method to test validates_associated in Rails Unit Tests?

Seems like this should be findable with a couple of Google searches...but no luck. I'm looking for an elegant approach to testing validates_associated in my models, such as... class Network < ActiveRecord::Base ... validates_associated :transporter ... end And the test: class NetworkTest < ActiveSupport::TestCase test 'should no...

How to validate database backups

I have a few remote databases, hosted at my web hosts. For mysql, I use periodic mysqldump and for MSSQL, I use bcp to back them up. How do I validate those backups? How do I make sure that the backup was not partial (its done over the public network). ...

jQuery validate() function.

I have a credit application form. If there is a co-applicant, I want to run the same validation for the primary applicant. Currently, I have: $().ready(function() { $("#cApp").validate({ rules: { ... }, messages: { ... } }); $('#coApp').click(function() { var coAppVal = $('input[name=coApp]').val(); if (coApp == 1) { $('#...

JQuery - Validate() and grouping similar form items

I have the following form: http://fuzzysiberians.com/app4.cfm when there is no social security number, my error message is being displayed after each text field. Is there a way to group these error messages so that there will be 3 text boxes next to each other and then display only one error message? ...