本文整理匯總了PHP中FormItem::email方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormItem::email方法的具體用法?PHP FormItem::email怎麽用?PHP FormItem::email使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FormItem
的用法示例。
在下文中一共展示了FormItem::email方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: function
};
break;
case 'last_name':
return function () {
InlineEditItem::text('last_name', NULL)->validationRule('required|regex:/^[a-zA-Z0-9_@]{3,100}$/');
};
break;
default:
return function () {
};
break;
}
})->form(function () {
FormItem::text('name', 'Name')->validationRule('required')->group('general');
FormItem::text('second_name', 'Second Name')->validationRule('required')->group('general');
FormItem::text('last_name', 'Last Name')->validationRule('required')->group('general');
FormItem::email('email', 'Email')->validationRule('required|email')->group('general');
FormItem::text('phone', 'Phone')->validationRule('required')->group('general');
if (!preg_match('/edit$/', Request::url()) && !preg_match('/update$/', Request::url())) {
FormItem::text('login', 'Login')->validationRule('required')->group('general');
FormItem::text('password', 'Password')->validationRule('required')->group('general');
}
FormItem::images()->type('model')->modelMethod('photos')->group('photos');
FormGroup::create('general', 'General')->setDisplayType(FormGroup::DISPLAY_TYPE_FULL);
FormGroup::create('photos', 'Photos')->setDisplayType(FormGroup::DISPLAY_TYPE_FULL);
})->viewFilters(function () {
ViewFilter::text('name', 'Name');
ViewFilter::text('second_name', 'Second Name');
ViewFilter::text('last_name', 'Last Name');
ViewFilter::text('email', 'Email');
});