DataTable refactor.
This commit is contained in:
13
src/lib/schema.ts
Normal file
13
src/lib/schema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as yup from 'yup';
|
||||
|
||||
export const dateRange = {
|
||||
startAt: yup.number().integer().required(),
|
||||
endAt: yup.number().integer().moreThan(yup.ref('startAt')).required(),
|
||||
};
|
||||
|
||||
export const pageInfo = {
|
||||
query: yup.string(),
|
||||
page: yup.number().integer().positive(),
|
||||
pageSize: yup.number().integer().positive().max(200),
|
||||
orderBy: yup.string(),
|
||||
};
|
||||
Reference in New Issue
Block a user