PmForm: template require field if=condition
Petko Yotov <[email protected]>
| Newsgroups | gmane.comp.web.wiki.pmwiki.user |
|---|---|
| Message-ID | <[email protected]> |
Is anyone using a PmForm template with the argument if=condition? (:template require field if="condition" errmsg="Invalid field":) I need to add a server-side email validation for email fields, that would look like this: (:template require email if=validemail errmsg="Invalid email":) In order to do this, I need to change a line of code. The way it has been documented for years doesn't work. Contrary to the documentation, the if= condition doesn't check the posted input. My change would make it work as documented, but it might possibly break existing PmForms that use it in an unintended way. I have now added this change to Subversion, you can get the nightly version or the changes from the page ChangeLog. If you have PmForms that rely on the old behavior, please let me know so that we can either find a workaround, or revert the latest changes. Petko -- If you upgrade : https://www.pmwiki.org/Upgrades