function fivestar_validate in Fivestar 5
Same name and namespace in other branches
- 6.2 fivestar.module \fivestar_validate()
- 6 fivestar.module \fivestar_validate()
- 7.2 fivestar.module \fivestar_validate()
File
- ./
fivestar.module, line 1574 - A simple n-star voting widget, usable in other forms.
Code
function fivestar_validate($form) {
if ($form['#required'] && (empty($form['vote']['#value']) || $form['vote']['#value'] == '-')) {
form_error($form, t('!name field is required.', array(
'!name' => $form['#title'],
)));
}
}