How to validate a form against a custom user profile field?
Try with this code it is helpful for you 

&lt;?php

function mymodule_form_alter(&amp;$form, &amp;$form_state, &amp;$form_id) {
      if ($form_id == 'form_id') {
    $form['#validate'][] = 'my_validation';
                                      }
                                                                }


function my_validation($node, $form, $form_state){

    if (!isset($form_state['values']['field_text']['und'][0]['field_text']['und'][0]['value']))
    {
        form_set_error('Text', 'Select text'); 
        }

}