Re: [Formsess-devel] validators: empty values
Status: Beta
Brought to you by:
mrkatana
From: David <da...@df...> - 2004-05-14 21:05:51
|
Alright, I added the "optional" attribute to the email, isbn, syntax and url validators. I also replaced the checIfEmpty attribute of the size validator (was broken anyway) by the optional attribute. This breaks bc but also the break of the other validators which accepted empty values before is not very grave, makes sense and is better done now. - david On Fri, 14 May 2004 17:03:53 +0200 Katana <ka...@ka...> wrote: > > I think in most cases people don't want to allow empty strings > > entered in email fields. Always adding two checks is very anoying > > and likely to be forgotten. > > Furthermore most of the users won't really read the manual that > > carefully to notice that empty string are accepted. > > If I hear about an email validator I expect it to reject empty > > string as they are not a valid email address. > > > > Also if you want to allow empty values and forget to add the > > acceptEmpty(or whatever) attribute people will complain because they > > get errormessages but if you don't want to allow empty values and > > don't know that the email check does you will run into problems with > > empty fields in your database, email without sender and maybe not > > even notice it. > > > > I strongly vote for an additional attribute to allow empty values > > but to reject them by default. They're just not an email address, > > it's that easy... (same for url) ;) > Yeah, thinking about it, I agree, now. An "optionnal" attribute should > > do the trick. But we will have a BC issue since with the old versions > optionnal had a default value of true, now it would be false... > > In order to implement it, I suppose it will be easy to add it properly > > to FormsessValidator main classes :) > > Katana > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > Formsess-devel mailing list > For...@li... > https://lists.sourceforge.net/lists/listinfo/formsess-devel > |