On 15.12.2008, at 00:29, mugeso wrote:

If anybody has any thoughts on that, please feel free to chime in -
any input will be appreciated.
How about is*ValueNull or something?
We wan't to check the value is null or null string, don't we?

No. The method is used by the validation system whether or not a value was "supplied". It uses that to figure out what to do depending on the value of the "required" attribute of a validator.

That's also why AgaviRequestDataHolder simply checks for the parameter existance in isParameterValueEmpty(), while the AgaviWebRequestDataHolder implementation also regards an empty string as empty - a web browser will submit an empty form field as "", and in that case, you don't want a <validator ... required="false" /> to run.

I agree that the naming of the method is somewhat confusing when compared to PHP's empty() statement, but it is not necessarily wrong. isParameterValueSubmitted() or such would describe the purpose incorrectly. It's not about whether or not the value has been sent to the server, but whether or not the request implementation regards it as empty.

- David

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev

Reply via email to