By default conditional validators are not evaluated and passed to the client. We do this because the state model when the form is rendered is not necessarily the state of the model when the validations fire server-side. However, if you wish to override this behavior you can do so in the form. Given the following model:
Passing :validate => true will force all the validators for that attribute. If there are conditionals they are evaluated with the state of the model when rendering the form
也就是说默认情况下条件验证是不会直接执行并传递给客户端(也就是你的 view 中 form 部分的代码),那如果你想让你自己写得条件验证生效的话,你就需要在表单代码里加入 :validate => true, 具体请参考上面的示例代码。