Skip to main content

One post tagged with "data schemas"

View All Tags

· 2 min read
Nathaniel Tucker

validateRequired() will validate that required fields are present; simplifying some common validation use cases. validateRequired() is available in @rest-hooks/@5.1.0 or greater.

class CustomBaseEntity extends Entity {
static validate(processedEntity) {
return validateRequired(processedEntity, this.defaults) || super.validate(processedEntity);
}
}