Re: [Formsess-devel] validators: empty values
Status: Beta
Brought to you by:
mrkatana
From: Katana <ka...@ka...> - 2004-05-14 14:59:01
|
> 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 |