Hello,
i need to insert a custom field in my customer registration form.
A registration number will be entered within this field.
2 checks must be carried out:
1) check that the number is among those loaded in the database
2) verify that it has not already been used
I use magento 2.4.5.
Do you have any suggestions?
To add a custom field to the customer registration form in Magento 2.4.5 and perform the required checks, follow these steps:
For more detailed instructions, consider consulting a Magento developer or referring to the official Magento documentation.
If the issue will be resolved, Click Kudos & Accept as a Solution.
how can i Create a custom validator class to check the registration number against the database? can you give me an example?
thanks for your help
To add a custom field to the customer registration form in Magento 2.4.5. Create a new module, define a new attribute for the registration number, modify the form layout to include the field, implement validation checks to ensure the number exists in the database and is unique, display error messages if needed, and save the custom attribute with the customer data. Seek documentation or developer help if necessary.