How to do validation on a custom field created in Customer doctype and export to my custom app

I have modified customer doctype to have a PAN number as well and have successfully exported using export customization to my code. However, how to add a client side as well as Server side logic for the same and export to my app

You have to make a code for the add custom field, when installing the custom app.

reference:

Using fixtures and then bench migrate wont work?