Fork me on GitHub
#yada
<
2017-08-21
>
danielcompton22:08:54

I'm using Yada for a traditional server-side rendered app. What is the recommendation for doing form validations? Yada throws an error if the POST parameters are incorrect, which makes sense for an API, but is not the friendliest for a user facing form.

dominicm22:08:19

@danielcompton you can control the contents of a response for a 400 error 🙂 So you can take the message and do what you want with it (e.g. run it through vlad)

delitescere13:08:33

Is a 400 status useful for a well-formed request entity with invalid data, especially for a browser POST?

dominicm22:08:14

Haven't checked the source, but there's a chance that the validation is replaceable/extendable in some way (likely with a new interceptor), so you could do something in that way

dominicm22:08:30

Was chatting with malcolm the other day about potential futures of the validation api

danielcompton22:08:13

Thanks 🙂

dominicm22:08:33

btw, highly recommend vlad for form validation

danielcompton22:08:27

Great, will start with that first