Yii Framework Forum: Validators And Error Codes - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Validators And Error Codes Current Yii validators don't allow to specify error code Rate Topic: -----

#1 User is offline   Vitaliy Kaplich 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 09-May 12

Posted 26 April 2013 - 04:32 PM

I'm working on web service utilizing Yii model validators and faced with pretty weird problem - there is no native and built in way to specify error code.

Of course I could return error code instead of error message and transform it into error message where it's needed, but I'm just curious did I miss something or Yii truly does not support error codes in validators?

If it does not I probably have to move this topic into "Feature Requests" forum, because the ability to return error code is highly required feature for pretty much all web services.

BTW for object oriented framework like Yii I believe it makes perfect sense to return extendable error object (like exception) instead of string error message and if my memory serves me this is the way Yii 2.0 is going to follow, correct?

P.S. I believe this question has come up already, but I could not find any reasonable solution neither on internet nor on this forum. Please point me to the right place if you know.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users