[pmwiki-users] PmForm: template require field if=condition
Petko Yotov
5ko at 5ko.fr
Sun May 7 02:54:05 PDT 2023
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
More information about the pmwiki-users
mailing list