DataTable refactor.

This commit is contained in:
Mike Cao 2023-09-22 00:59:00 -07:00
parent 92ccc64e47
commit 6846355c63
17 changed files with 94 additions and 114 deletions

View file

@ -1,19 +0,0 @@
import * as yup from 'yup';
export function getDateRangeValidation() {
return {
startAt: yup.number().integer().required(),
endAt: yup.number().integer().moreThan(yup.ref('startAt')).required(),
};
}
// ex: /funnel|insights|retention/i
export function getFilterValidation(matchRegex) {
return {
filter: yup.string(),
filterType: yup.string().matches(matchRegex),
pageSize: yup.number().integer().positive().max(200),
page: yup.number().integer().positive(),
orderBy: yup.string(),
};
}