Why I've got Fatal error of undefined validation function in my form?
Change page callback form drupal_get_form to function, because if you use drupal_get_form in call back it return form and in your function you create another form, it means form in form and make conflict.

$items['share/%'] = array(
    'page callback' =&gt; 'ym_alter_sharing_content',
    'access callback' =&gt; 'user_is_logged_in',
    'type' =&gt; MENU_CALLBACK,
);