我试图以几种形式来抓捕,但没有任何uck。 我总是从我的“recaptcha_response_field”中犯了一个错误,称“你没有正确进入这些词语。 请再次审判
我需要回头看我的大多数形式,但我想ski一些。 我尝试了“MultivalidatableBehavior” 但我无法做到这一点。
关于我如何能够做到这一点的想法?
Thanks, Bart
我试图以几种形式来抓捕,但没有任何uck。 我总是从我的“recaptcha_response_field”中犯了一个错误,称“你没有正确进入这些词语。 请再次审判
我需要回头看我的大多数形式,但我想ski一些。 我尝试了“MultivalidatableBehavior” 但我无法做到这一点。
关于我如何能够做到这一点的想法?
Thanks, Bart
你们将不得不将原始行为ed为主...... 这将是这样做的最容易的方法,你也可以在行为上这样做,但这种方式简单易行。
//Your Controller
function add(){
$this->{$this->modelClass}->reCaptcha = true;
if(!empty($this->data)){
$this->{$this->modelClass}->save($this->data);
}
}
//Edit Recaptcha ValidateBehavior
function beforeValidate(&$model) {
if(isset($model->reCaptcha) && $model->reCaptcha){
$model->validate[ recaptcha_response_field ] = array(
checkRecaptcha => array(
rule => array( checkRecaptcha , recaptcha_challenge_field ),
required => true,
message => You did not enter the words correctly. Please try again. ,
),
);
}
}
I need to validate that atleast one check box is selected from a list of checkboxes using jQuery Validation Plugin. Since the checkboxes are part of a ASP.NET GridView Control, the names of these ...
I am sorry I didn t know how to title my question any better, you name it if you got a good 1. I have an entity Contact. this person has navigation properties: Address, Phones (A collection of Phone)....
I have a datagrid with rows where the validation depends on his siblings. So far I m using BindingGroups and a custom ValidationRule to validate multiple rows a the same time. But I can t figure out ...
Enterprise Library Validation Application Block (VAB) integrates with ASP.NET and also with WCF. Is there a way to integrate ValidationResults created in WCF with ASP.NET? e.g. an ASP.NET web ...
Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...
We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...
I ve searched high and low, but I could not find a solution, to what I think seems like a very common task. In a form I want to have a text input that accepts currency strings (i.e. $1,000,000 or ...
I m using the form validation library and have something like this in the view <p> <label for="NAME">Name <span class="required">*</span></label> <?...