updated realtime form validator with more human friendly message and added more tests

This commit is contained in:
Gani Georgiev
2024-10-08 12:46:42 +03:00
parent fdf63d3912
commit 92b759438d
2 changed files with 75 additions and 1 deletions

View File

@@ -161,6 +161,7 @@ type realtimeSubscribeForm struct {
func (form *realtimeSubscribeForm) validate() error {
return validation.ValidateStruct(form,
validation.Field(&form.ClientId, validation.Required, validation.Length(1, 255)),
validation.Field(&form.Subscriptions, validation.Length(0, 1000)),
)
}