C
C
cat_crash2014-11-03 11:16:05
Yii
cat_crash, 2014-11-03 11:16:05

Yii: How to correctly throw an error from Filter ?

Good day
The controller uses its own filters, the essence of which is to check before the action whether the authorized user has exhausted the limits (For example, according to the tariff plan, he is supposed to place no more than 10 products).
Vopors - how to correctly display a warning if the user tries to add 11 products?
While implemented through CException but obviously it is not correct.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Zelenin, 2014-11-03
@zelenin

through the exception is quite correct.

I
Ilya Plotnikov, 2014-11-10
@ilyaplot

In the model, in the rules, specify your filter, and for the normal display of the message, use the message parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question