Yii Framework Forum: Create Yii Customized Form With Validator - Yii Framework Forum

Jump to content

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

Create Yii Customized Form With Validator Rate Topic: -----

#1 User is offline   jack1234 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-March 13

Posted 23 March 2013 - 08:43 PM

I have some form, with css defined and with some textfields, let's use the following as example
<link rel="stylesheet" type="text/css" href="test.css"/>
<form action="/em/call" class="myStyle">
field1:<input text="hello"></input>
<input value="submit" type="submit"/>
</form>

Is it possible to show validation error if field1 is non-empty using Yii built-in validator, if yes, how should I do that?

(In the example given by Yii, it seems using CWidget::form, i am not sure how to customized that in my project, where GUI has been defined)
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