@xpresser/abolish
Version:
Using Abolish validator in Xpresserjs
24 lines (23 loc) • 757 B
TypeScript
import type { DollarSign } from "xpresser/types";
import type { Http } from "xpresser/types/http";
import type { ValidationError } from "abolish/src/types";
declare const _default: ($: DollarSign) => {
/**
* Validation Rules
* If `validationRules.enabled` is true
* Your ValidationRule file will be loaded
*/
validationRules: {
enabled: boolean;
file: string;
onError(http: Http, err: ValidationError): Http.Response;
};
/**
* Provide Abolish.
* The Abolish Class returned here will be used for validation.
* This method also gives you the opportunity to extend Abolish
* Or provide a custom class to be used.
*/
provideAbolish: () => any;
};
export default _default;