On Feb 18, 2009, at 8:44 PM, [email protected] wrote:


Would the following be another "usable" solution?

<validator class="equals" required="false">
<argument>user_disabled</argument>
<ae:parameter name="value">1</ae:parameter>
</validator>

$user_disabled = $rd->getParameter('user_disabled', 0); // default
value if not present

I've been considering that, in most cases it will lead to the same
result. However, it will behave differently in a number of edge- cases,
most notably that $rd->hasParameter('user_disabled'); will return
false, while in the other cases it will return true.


True, implementing the OR solution will be the default for me from now on. :-)

Well, it may be a desired side-effect as actually no value has been provided by the user. It's just important to note that both solutions behave slightly different.



Thanks for the fast response,

You're welcome.



Steffen

felix

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

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to