I recently discovered that the OOUI library, when an input is declared as
"required" (i.e., mandatory), accomplishes this by adding the
parameter to the input, which is an HTML parameter that's part of HTML5.
When "required" is specified, the browser checks the input when the form
gets submitted, and, if it's blank, displays an error message and prevents
It's certainly convenient to be able to use HTML's "required", but I
some weaknesses with this approach, compared to a built-in MediaWiki
- There is less i18n support. Some browsers have quite impressive language
support - Google Chrome seems to support around 150 languages - but none
have the comprehensiveness of MediaWiki.
- The error message is displayed in the language of the user's browser
settings, rather than in the language they have for the wiki. (Why the two
would be different, I don't know, but it's possible.)
- The display of the error message does not match the OOUI look-and-feel.
Any thoughts about all of these? Was the use of "required" a conscious
decision, or just a matter of convenience?
WikiWorks · MediaWiki Consulting · http://wikiworks.com