numericality
Use the numericality validator to clamp a number between two values
export default class Rating extends Dream {
public readonly get table() {
return 'users' as const
}
public id: DreamColumn<Rating, 'id'>
@Validates('numericality', { min: 1, max: 5 })
public rating: DreamColumn<Rating, 'rating'>
}