Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] QuickForm + "soft" rules.
On 5/27/05, Edward Grace <ej.grace@imperial.ac.uk> wrote:
> Has anyone else come across the need to add "soft" (rules that the user c=
an
> choose to override) validation rules to QuickForm objects?
>=20
> What I mean by this is a typical scenario where you may have a rule that
> checks that a person has entered their name according to some case format=
ting
> so for example.
>=20
>  Surname
>=20
> Rather than
>=20
>  sURnaMe
>=20
> There are however situations where the case formatting of a surname could=
not
> fit into the typical box of "capital first letter, the rest lowercase" he=
nce
> not being able to use a filter rule.  For example the surnames
>=20
>  van Blogger
>  al Tranger
>  McTaggert
>=20
> Clearly break this "convention".  Of course one could add exceptions for
> "van", "al" "Mc" prefixes but you still can't guarentee catching them all
> with a "strong" validation rule.
>=20
> What would be useful is to have a soft validation rule whereby, if it fai=
ls
> the usual message appears along with a checkbox saying "Yes I really want=
to
> submit this" that would override the associated rule.
>=20
> This can be done with some hacking about using groups, rules etc but it w=
ould
> be nice to have a addSoftRule() method, or some such that would generate =
the
> appropriate elements if the validation failed, and deal with overriding t=
he
> rule if the checkbox is set.
>=20
> Have people looked at this before?  I imagine it is a common want.
>=20

Sounds like a great idea. In fact, it's a *little* like the
preValidationCallback option I added to my SubForm element. I'll see
if I can find a few minutes to see if I can hack something up.

--=20
Justin Patrin

Report this thread to moderator Post Follow-up to this message
Old Post
Justin Patrin
05-28-05 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.