#How to return validation error if a field was not expected?
9 messages · Page 1 of 1 (latest)
Do you mean if someone adds an input field by editing the source?
I don’t think there’s anything out of the box but there’s nothing stopping you making your own validation rule
the actual case would be an error by the developer, e.g. an api client that mistypes a key
the rules are only applied to the individual fields that are already specified, not to the entirety of the request
Yeah sorry “validation rule” was a bit misleading, I meant there’s nothing stopping you implementing the checks yourself
Not sure you’ll gain a whole in lot in honesty though
Something like a macro added to Request could work, some sort of middleware, a trait you include in controllers, couple of ways
isn't this the exact issue so the fillable property is there for?