Does this look right for adding a terms of use checkbox to register form? And also, how can I get node/terms to open target="_blank"?

&lt;?php


function MYMODULE_form_alter(&amp;$form, $form_state, $form_id) {
    if($form_id == 'user_register') {
  $form['legal'] = array(
      '#type' =&gt; 'fieldset',
      '#title' =&gt; t('legal'),    
    );
  $form['legal']['select'] = array(
      '#type' =&gt; 'checkbox',
      '#required' =&gt; TRUE,
      '#title' =&gt; t('Terms of Use&lt;span class="form-required" title="' . t('This field is required') . '"&gt;*&lt;/span&gt;'),
      '#default_value' =&gt; 0,
      '#description' =&gt; t('I certify that I am over the age of 18, and I have read and agree to the '.l('Terms of use.','node/terms').''),     
    );   
  $form['#validate'][] ='customfunctions_form_validate_custom';
  }  

}  



function MYMODULE_form_validate_custom($form, &amp;$form_state) {
    $legal = $form_state['values']['select'];  
    if ($legal == 0) {
        form_set_error('select', 'Please check the agreement.');
    }
}


?&gt;
Yes, but I would change

$form['#validate'][] ='customfunctions_form_validate_custom';


to

$form['#validate'][] ='MYMODULE_user_registration_form_validate';


and 

function MYMODULE_form_validate_custom($form, &amp;$form_state) {


to 

function MYMODULE_user_registration_form_validate($form, &amp;$form_state) {


Nothing wrong with your code, but this just keep with the Drupal naming convention ie search_form_validate,  node_form_validate, etc

Also

'#title' =&gt; t('Terms of Use&lt;span class="form-required" title="' . t('This field is required') . '"&gt;*&lt;/span&gt;'),


is bad

'#title' =&gt; t('Terms of Use') . "&lt;span class='form-required' title='" . t('This field is required') . "'&gt;*&lt;/span&gt;",