function recipe_validate in Recipe 6
Same name and namespace in other branches
- 5 recipe.module \recipe_validate()
- 7.2 recipe.module \recipe_validate()
- 7 recipe.module \recipe_validate()
Implementation of hook_validate().
Errors should be signaled with form_set_error().
File
- ./
recipe.module, line 1212 - recipe.module - share recipes
Code
function recipe_validate($node, &$form) {
if (!is_numeric($node->yield) || $node->yield <= 0) {
form_set_error('yield', t('Yield must be a valid positive integer.'));
}
}