How to make “Middle Name” field and “Photo Capture” mandatory on the registration first page

Hello Team,

I want to make the “Middle Name” field and “Photo Capture” mandatory on the registration first page.

What I have figured out till now:

In app.json in registration I got configuration for patients Last Name mandatory i.e. “isLastNameMandatory”: true which is working properly

I tried it out the same for Middle Name mandatory as “isMiddleNameMandatory”: true but it is not working.

Is there any configuration to make “Photo Capture” mandatory on the registration first page in Bahmni ?

Could you suggest any configuration that I should try?

I feel you should be able to do this with customValidator.js copied into config registration folder.

See this documentation on wiki: https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3506184/Registration+Page: Section: Registration Page Custom Field Validation Configurations

See some sample registration screen validation scripts written by other implementations:

Sample1:

Sample2:

@gsluthra Thanks for the reply. I tried the above configuration but it did not work. I have used the alternative solution i.e. to add “non-blank pattern-validate” in bahmniapps for file /app/registration/views/patientCommon.html which is working as expected.