HTML_QuickForm_Rule_Spelling
A HTML_QuickForm rule plugin that checks the spelling of the element that it's applied to. Making the use of the php pspell library, words may be added to a personal dictionary, ignored or possible suggestions may be viewed.
Example Usage
<?php
require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/Rule/Spelling.php';
$form =& new HTML_QuickForm; $form->addElement('header','header','Test spelling of this textarea'); $form->addElement('textarea','sometext','Some Text:');
$form->addElement('submit','submit','Submit');
$form->addRule('sometext',null,'spelling',array('quickform' => &$form, 'element' => 'sometext', 'personal_dictionary' => './personal.dict', 'mode' => PSPELL_FAST, 'style' => true));
$form->validate(); $form->display();
?>
Example Output
|