Possible to pull the validate hook on forms not in form api Is it possible to utilise the validate hook from within a node rather than a module? The code below works within a module calling a form with the form API. But if i was to have a variable in a node page, could i utilise the same function within the nodes html/php? if so how? or a similar validate function?

$mynumber= $_POST[mynumber];


e.g.  

function form_example_form_validate($form, &amp;$form_state) {
      if (!is_numeric($form_state['values']['mynumber'])){
form_set_error('mynumber', t('Validation: You must enter a valid number for the number field.'));
The validate handlers for forms aren't hooks as such, they're just functions that use a naming convention provided by the FAPI (small point, but worth mentioning).

Technically speaking, you might get away with putting said function in PHP in the body of a node. If you have a form called MYMODULE_form_test, and declare a function called MYMODULE_form_test_validate in the body of a node, the processor might well pick it up in time, and Drupal might call it during form validation. But you'd probably get some strange, incorrect results when you turn caching on. 

Either way, I wouldn't rely on it working forever more; it's certainly not an advisable workflow, and keeping code in the node body is considered very bad practice. 

Creating a module only takes a couple of minutes, and this sort of functionality is exactly what they're designed to contain.