I am using magento 2.1.7. I have added vat field to billing address form. I want to add custom field validation. i have added below code.
Added below validation to phtml file
But my custom validation not working. Magento required field validation is working fine. Can anyone help me.
Best Answer
Override rules.js using below code in my custom module
app/code/Test/Custom/view/frontend/requirejs-config.js
created js file at app/code/Test/Custom/view/frontend/web/js/validation/rules.js
Run php bin/magento setup:static-content:deploy command.