title: Ultimate Member Plugin Birth Date Validation
body: <p>I need help solving a problem. I am using Ultimate Member plugin for Birth Date validation. I want to check the year the user input from the Data Selection and check to see if they are 13 years or older. I have tried solving it with hooks but it would not allow custom validation on a Date Picker. Here is my code:</p>
  <pre><code>    add_action('um_submit_form_errors_hook_student_birthdate','um_custom_validate_birthdate', 999, 1);
  
      function um_custom_validate_birthdate( $args ) {
  
         $birthDate = $args['birth_date'];
        //explode the date to get month, day and year
        $birthDate = explode(&quot;/&quot;, $birthDate);
        //get age from date or birthdate
        $age = (date(&quot;md&quot;, date(&quot;U&quot;, mktime(0, 0, 0, $birthDate[1], $birthDate[2], $birthDate[0]))) &gt; date(&quot;md&quot;)
      ? ((date(&quot;Y&quot;) - $birthDate[0]) - 1)
      : (date(&quot;Y&quot;) - $birthDate[0]));
  
      if ( isset( $args['birth_date'] ) &amp;&amp; $age &lt; 13 ) {
          UM()-&gt;form()-&gt;add_error( 'birth_date', &quot;You must be atleast 13 years old to create an account.&quot; );
      }
  }
  </code></pre>