@skaterdav85, I am using validatorjs with Angular js, The application is working fine as expected, but during testing Validator is not defined error I am facing. Because in Angular js we need to inject each and every plugin or library we are using in our module and controller. But we are not injecting here we are directly using:
var validation = new Validator(data, rules [, customErrorMessages]);
So inside all the controllers it is available globally, but how can I access it as a service or a factory?
@skaterdav85, I am using validatorjs with Angular js, The application is working fine as expected, but during testing
Validator
is not defined error I am facing. Because in Angular js we need to inject each and every plugin or library we are using in our module and controller. But we are not injecting here we are directly using:var validation = new Validator(data, rules [, customErrorMessages]);
So inside all the controllers it is available globally, but how can I access it as a service or a factory?