How to use and validate profile2 profiles in custom forms?

Hi there drupallers, this is Abdullah here, I’m stuck with a problem and hoping a working solution from you.

I am trying to built a multi step sign up form for my drupal 7 site, therefore I followed this article:

http://matthewgrasmick.com/article/building-multistep-registration-form-…

And I have built a module by following this article.

Now problem is that in first step of my form, I would like to take the personal information of users, such as : First name, Last name, Date of Birth etc. therefore I need to use one of my profile from profile2 called “personal”.

But I can’t figureout that how can i use that profile in first step? and how to validate it?

Because without validation it won’t work.

Looking forward to a working example or solution.

Thanks in advance.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed