How to stop model names from being included in custom validation messages #15550
Unanswered
quasipickle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have some custom validation set up in my model. The message I want reported is
"Calories" are too long. Only 5 digits allowed.
However, the message that gets pulled fromgetMessages()[0]->getMessage()
is<strong>Model\Item</strong>: "Calories" are too long. Only 5 digits allowed.
This is quite bad because
Model\Item
means, andalert()
box.How do I make validation report messages just like how I've defined them?
Beta Was this translation helpful? Give feedback.
All reactions