阅读背景:

如何在Yii bootstrap中将客户端验证放在TbActiveForm中?

来源:互联网 

I have created a form using widget -bootstrap.widgets.TbActiveForm with form elements like textFieldRow, TbTypeahead, CJuiDatePicker and TbButton. I have implemented ajax form submission and it works fine. And I have included a simple client side validation,the rules are defined in the EmployeeRegister model. Its a simple validation for empty fields only. The problem is that when I submit the form with required fields empty, the form get submitted. That is, no validation is performed. But it displays error message "Name cannot be blank." or "Address cannot be blank.". Can anyone help me to fix this issue?? I am attaching my code below. // MOdel- EmployeeRegisterI have created a form using widget -bootstrap.w




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: