feat(frontend): validators
This commit is contained in:
@ -87,6 +87,7 @@ const locationValidator = strictObject({
|
||||
Name: string(),
|
||||
Address: nullable(string()),
|
||||
Description: nullable(string()),
|
||||
Images: array(pipe(string(), uuid())),
|
||||
});
|
||||
|
||||
const contactValidator = strictObject({
|
||||
@ -95,6 +96,7 @@ const contactValidator = strictObject({
|
||||
Description: nullable(string()),
|
||||
PhoneNumber: nullable(string()),
|
||||
Email: nullable(string()),
|
||||
Images: array(pipe(string(), uuid())),
|
||||
});
|
||||
|
||||
const eventValidator = strictObject({
|
||||
@ -107,6 +109,7 @@ const eventValidator = strictObject({
|
||||
// Location: nullable(locationValidator),
|
||||
OrganizerID: nullable(pipe(string(), uuid())),
|
||||
// Organizer: nullable(contactValidator),
|
||||
Images: array(pipe(string(), uuid())),
|
||||
});
|
||||
|
||||
const noteValidator = strictObject({
|
||||
@ -114,6 +117,7 @@ const noteValidator = strictObject({
|
||||
Name: string(),
|
||||
Description: nullable(string()),
|
||||
Content: string(),
|
||||
Images: array(pipe(string(), uuid())),
|
||||
});
|
||||
|
||||
const locationDataType = strictObject({
|
||||
|
Reference in New Issue
Block a user