I want to override or update core validation for magento frontend form like as checkout page form address field validation change.
need to change the core validation
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou must use this:
1) In input or select tag add our validaion with this code
data-validate="{required:true, 'validate-custom-name':true}"
2) Add js validation for “Validate-custom-name”
<script type="text/javascript">
require(['jquery', // jquery Library
'jquery/ui', // Jquery UI Library
'jquery/validate', // Jquery Validation Library
'mage/translate' // Magento text translate (Validation message translte as per language)
], function($) {
$.validator.addMethod('validate-custom-name', function(value) {
return (value !== 'test'); // Validation logic here
}, $.mage.__('Enter Valid name'));
});
</script>