A HTML_QuickForm rule plugin that checks the spelling of its value(s). This rule uses drivers, of which the default is HTML_QuickForm_Rule_Spelling_Pspell.
This rule may be applied to multiple fields via the use of an array, or applied singular fields one at a time. The spellchecker will go cycle through each misspelt word of each specified field for that form (and only that form).
The following parameters are required to be passed in through the options field:
form A reference to the HTML_QuickForm object.
element_name The name of the element the rule applies to. If this rule
was applied to an array of elements, this must be an array
of names in the same order.
The following options are set statically via HTML_QuickForm_Rule_Spelling::setOption():
allow_ignore Whether to allow words to be ignored.
allow_add Whether to allow words to be added to the dictionary.
word_delimiter Regular expression to use as delimiter.
spellchecker Spellchecking driver. Either create your own or use
IE and Safari do not support multiple selections
IE <7 does not support fixed positioning
IE7 only supports fixed positioning when in strict mode, however not even
in quirks mode does it support the expression workaround for fixed positioning.
The expression workaround
// or alternatively apply the rule in one go //$form->addRule(array('text_1','text_2'), 'Please correct the spelling mistakes', 'spelling', // array('form' => $form, // 'element_name' => array('text_1','text_2')));