Closed gadimbaylisahil closed 1 year ago
This will be handled using JS DOM elements. Since Gender is custom field added by us, it is easier to handle as no backend validation exists. But in birthday field when we require birthday using global system flag it also enables backend validation. Bypassing front-end validation by removing element and making it not required is not enough. I suggest not to enable birthday required flag at all. During registration when it is selected Private as account type, we make it appear in DOM and be required using JS.
@gadimbaylisahil if you agree, I change implementation that way.
@hasanzade-hasan
Sounds good 👍🏻
Description
When the payer is commercial/company, Gender and Birth Date should NOT be passed to the API. It should not be collected from the customers as well.
Problems
When we turn on
collect DOB
in the configuration settings, we mutate the global flag. We have to find a way/workaround for this to control this in checkout page.Same for gender...