Skip to content

How to add Multiple validation rule

I have to add three validation rule and as you see below code works well for one rule :
validation-mixin.js

define([
    'jquery'
], function ($) {
    "use strict";
    console.log('this is own');
    return function (validator) {
        $.validator.addMethod(
            'myvalidation',
            function (value) {
                // Some custom validation stuff here
                
                return false;
            },
            $.mage.__('myvalidation')
        );
        return validator;
    }
});

I searched the site questions and does not find a question something like this.

Is any way to add more validation rules in magento2 with out override rules.Js file ?