Yii Framework Forum: Validators Without Models - Yii Framework Forum

Jump to content

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

Validators Without Models

#1 User is offline   egorpromo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 02-December 12

Posted 17 September 2013 - 07:02 AM

It can be handy if some validators can be used without models. I know now that email can be validated without model. It is good if some more validators support the same functionality. For example CBooleanValidator. There will be the best way to use yii core validators for any kind of validation.
It is needed to pull out some validate methods and make them autonomous and public for client code.
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,614
  • Joined: 17-January 09
  • Location:Russia

Posted 17 September 2013 - 12:47 PM

It's already done. Check validateValue method.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
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