import { validateDataUsingSchema } from "@intuned/browser";
export default async function handler(params, page, context){
const userData = {
name: "John Doe",
email: "john@example.com",
age: 30
};
const userSchema = {
type: "object",
required: ["name", "email", "age"],
properties: {
name: { type: "string", minLength: 1 },
email: { type: "string", format: "email" },
age: { type: "number", minimum: 0 }
}
};
await validateDataUsingSchema({ data: userData, schema: userSchema });
// Validation passes, no error thrown
}