@athenna/validator
Version:
The Athenna validation solution. Built on top of VineJS.
19 lines (18 loc) • 467 B
JavaScript
/**
* @athenna/validator
*
* (c) João Lenon <lenon@athenna.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { v } from '#src';
import { Validate } from '#src/facades/Validate';
export class BaseValidator {
constructor() {
this.validator = Validate.schema;
}
async validate(data) {
return v.validate({ schema: this.schema, data });
}
}