Test /
PitsFormCheckVersionInput
Can we do even better than the new "Latest:" button next to the version field?
Demo for one aspect of PITS.01412.
- To simulate the future of PITS, edit the version input box in your DOM inspector and set the attribute
pattern="^\s*2\.2\.98\s*$"
(ideally with current numbers).- If we want to avoid the
required
attribute, we can negate the validation (pattern="^(?!(?=\s*2\.2\s*$)).*"
) and CSS criteria. This should also help if there are browsers that have problems with concluding CSS:invalid
from an empty required field.
- If we want to avoid the
- If your browser doesn't support pattern regexp validation, you can try ticking one of the checkboxes instead. Or both to simulate a broken browser. ;-)
- Future versions of PmWiki might generate the pattern via a markup expression like
{(preg_quote "{(substr "{$Version}" 7)}")}
.