how to call a function within the rules: validation?

For the rules, how can I create my own function (ie. myfunction(a,b) {} ) in place of emailaddress: function() ?
rules:{
firstname: webix.rules.isNotEmpty,
lastname: webix.rules.isNotEmpty,
emailaddress: function(){ … },

into something like…

			rules:{
				firstname: webix.rules.isNotEmpty,
				lastname: webix.rules.isNotEmpty,
				emailaddress: myfunction(param1,param2){ ... },

myfunction(a,b) {

}

not sure what do you mean by param1 and param2

you can write validation function in similar way, but it will receive only one value - inputs value for validation

emailaddress: myfunction(value){ return some_check(value); },