Ernst Bunders wrote: > small question: if you never enforce the pattern, then why define it at > all?
It means that it is never enforced by MMBase then, so it will not cause an error if the input fails to obey it. You can still request the pattern and use it e.g. to decide whether the input form entry must become a textarea or not, or to generate validating javascript with it or so. E.g. the taglib's 'mm:fieldinfo' now checks if the pattern allows a newline, and if so, it generates a textarea, and otherwise a normal one-line input box. There is also 'enforce="oncreate"', in which case mmbase will only throw errors if new input is invalid. enforce="onchange" will only enforce if a field value is changed. This can be used for backwards compatibility, but also for datatypes for wich the validity of values can change in time (like datetime values with a minummum value relative to the current time). Michiel -- Michiel Meeuwissen mihxil' Peperbus 111 MediaPark H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
