* Front: Model: Write Validators * Front: Plage response validator * Front: API: Typing 'fetch' return * Front: Basic Models: Response Handlers * Front: API: Validate authentication response * Front: Validate Search History * Front: Validate Responses of User updates * Front: On Validation Error, more verbose console error
10 lines
181 B
TypeScript
10 lines
181 B
TypeScript
import * as yup from 'yup';
|
|
|
|
export const ModelValidator = yup.object({
|
|
id: yup.number().required(),
|
|
});
|
|
|
|
type Model = yup.InferType<typeof ModelValidator>;
|
|
|
|
export default Model;
|