コード例 #1
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabledBeforeApproval'], 'string'], [['maxValue'], 'integer', 'min' => 5, 'max' => 1000], [['securityRateLimitRequests'], 'integer'], [['securityRateLimitTime'], 'integer'], [['elementPropertyRatingCode'], 'string'], [['elementPropertyCountCode'], 'string'], [['messageSuccessBeforeApproval'], 'string'], [['messageSuccess'], 'string'], [['notify_emails'], 'string'], [['notifyPhones'], 'safe'], [['maxCountMessagesForUser'], 'integer'], [['enabledFieldsOnGuest'], 'safe'], [['enabledFieldsOnUser'], 'safe'], [['securityEnabledRateLimit'], 'string'], [['enabledBeforeApproval', 'securityEnabledRateLimit'], 'in', 'range' => array_keys(\Yii::$app->cms->booleanFormat())], [['notify_emails'], function ($attribute) {
         if ($this->notifyEmails) {
             foreach ($this->notifyEmails as $email) {
                 $validator = new EmailValidator();
                 if (!$validator->validate($email, $error)) {
                     $this->addError($attribute, $email . ' — ' . \Yii::t('skeeks/reviews2', 'Incorrect email address'));
                     return false;
                 }
             }
         }
     }]]);
 }
コード例 #2
0
ファイル: ShopComponent.php プロジェクト: BMOTech/cms-shop
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['email'], 'string'], [['payAfterConfirmation'], 'string']]);
 }
コード例 #3
0
ファイル: CmsToolbar.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['editWidgets', 'editViewFiles', 'infoblockEditBorderColor', 'isOpen'], 'string'], [['enabled', 'enableFancyboxWindow'], 'integer']]);
 }
コード例 #4
0
ファイル: PropertyType.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [['multiple', 'string'], ['multiple', 'in', 'range' => array_keys(\Yii::$app->cms->booleanFormat())]]);
 }
コード例 #5
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabledBeforeApproval'], 'string'], ['enabledBeforeApproval', 'default', 'value' => Cms::BOOL_Y], [['securityRateLimitRequests'], 'integer'], [['securityRateLimitTime'], 'integer'], [['elementPropertyCountCode'], 'string'], [['messageSuccessBeforeApproval'], 'string'], [['messageSuccess'], 'string'], [['notifyEmails'], 'safe'], [['notifyPhones'], 'safe'], [['maxCountMessagesForUser'], 'integer'], [['enabledFieldsOnGuest'], 'safe'], [['enabledFieldsOnUser'], 'safe'], [['securityEnabledRateLimit'], 'string'], [['enabledBeforeApproval', 'securityEnabledRateLimit'], 'in', 'range' => array_keys(\Yii::$app->cms->booleanFormat())]]);
 }
コード例 #6
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['kladrApiToken'], 'string'], [['russiaId'], 'integer'], [['kladrRequestLimit'], 'integer', 'max' => 400, 'min' => 5]]);
 }
コード例 #7
0
ファイル: CmsSettings.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['sessionType'], 'string']]);
 }
コード例 #8
0
ファイル: AdminSettings.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['asset', 'languageCode', 'pageParamName', 'enabledPjaxPagination'], 'string'], [['pageSize'], 'integer'], [['ckeditorCodeSnippetGeshi'], 'string'], [['ckeditorCodeSnippetTheme'], 'string'], [['enableCustomConfirm', 'enableCustomPromt', 'pageSize'], 'string'], [['ckeditorPreset', 'ckeditorSkin'], 'string'], [['ckeditorHeight'], 'integer'], [['blockedTime'], 'integer', 'min' => 300]]);
 }
コード例 #9
0
ファイル: AuthClientSettings.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabled'], 'boolean'], [['githubEnabled'], 'boolean'], [['githubClientId'], 'string'], [['githubClientSecret'], 'string'], [['githubClass'], 'string'], [['vkEnabled'], 'boolean'], [['vkClientId'], 'integer'], [['vkClientSecret'], 'string'], [['vkClass'], 'string']]);
 }
コード例 #10
0
ファイル: GridViewSettings.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabledPjaxPagination'], 'string'], [['pageParamName'], 'string'], [['pageSize'], 'string'], [['orderBy'], 'string'], [['order'], 'integer'], [['visibleColumns'], 'safe']]);
 }
コード例 #11
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['levels'], 'safe'], [['logVars'], 'safe'], [['exceptString'], 'string'], [['categoriesString'], 'string'], [['enabled'], 'string'], [['storeLogsTime'], 'integer'], [['exportInterval'], 'integer']]);
 }
コード例 #12
0
ファイル: ShopComponent.php プロジェクト: skeeks-cms/cms-shop
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['email'], 'string'], [['payAfterConfirmation'], 'string'], [['storeCmsContentId'], 'integer'], ['notify_emails', 'string']]);
 }
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabled'], 'boolean'], [['noReplaceLocalDomain'], 'boolean'], [['enabledB64Encode'], 'boolean'], [['noReplaceLinksOnDomainsString'], 'string'], [['noReplaceLinksOnDomains'], 'safe']]);
 }
コード例 #14
0
ファイル: Seo.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enableKeywordsGenerator', 'minKeywordLenth', 'maxKeywordsLength'], 'integer'], ['robotsContent', 'string'], ['useLastDelimetrContentElements', 'boolean'], ['useLastDelimetrTree', 'boolean']]);
 }
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['enabled'], 'boolean'], [['jsCompress'], 'boolean'], [['jsCompressFlaggedComments'], 'boolean'], [['cssFileCompile'], 'boolean'], [['cssFileRemouteCompile'], 'boolean'], [['cssFileCompress'], 'boolean'], [['jsFileCompile'], 'boolean'], [['jsFileRemouteCompile'], 'boolean'], [['jsFileCompress'], 'boolean'], [['jsFileCompressFlaggedComments'], 'boolean'], [['cssCompress'], 'boolean'], [['cssFileBottom'], 'boolean'], [['cssFileBottomLoadOnJs'], 'boolean'], [['htmlCompress'], 'boolean'], [['htmlCompressExtra'], 'boolean'], [['htmlCompressNoComments'], 'boolean']]);
 }
コード例 #16
0
ファイル: Cms.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['adminEmail', 'noImageUrl', 'notifyAdminEmails', 'notifyAdminEmailsHidden', 'appName', 'template', 'languageCode'], 'string'], [['adminEmail'], 'email'], [['adminEmail'], 'email'], [['emailTemplate'], 'string'], [['passwordResetTokenExpire'], 'integer', 'min' => 300], [['hitAgentsInterval'], 'integer', 'min' => 60], [['enabledHitAgents'], 'string'], [['registerRoles'], 'safe'], [['enabledHttpAuthAdmin'], 'string'], [['enabledHttpAuth'], 'string'], [['httpAuthLogin'], 'string'], [['httpAuthPassword'], 'string'], [['debugEnabled'], 'string'], [['debugAllowedIPs'], 'string'], [['giiEnabled'], 'string'], [['giiAllowedIPs'], 'string'], [['licenseKey'], 'string'], [['notifyAdminEmails'], function ($attribute) {
         if ($emails = $this->notifyAdminEmailsToArray()) {
             foreach ($emails as $email) {
                 $validator = new EmailValidator();
                 if (!$validator->validate($email, $error)) {
                     $this->addError($attribute, $email . ' — некорректный email адрес');
                     return false;
                 }
             }
         }
     }], [['notifyAdminEmailsHidden'], function ($attribute) {
         if ($emails = $this->notifyAdminEmailsHiddenToArray()) {
             foreach ($emails as $email) {
                 $validator = new EmailValidator();
                 if (!$validator->validate($email, $error)) {
                     $this->addError($attribute, $email . ' — некорректный email адрес');
                     return false;
                 }
             }
         }
     }]]);
 }
コード例 #17
0
ファイル: V3toysSettings.php プロジェクト: v3toys/skeeks
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [['v3toysIdPropertyName', 'string'], ['content_ids', 'safe'], ['v3toysShopPersonTypeId', 'integer'], ['affiliate_key', 'string'], ['v3toysOrderStatusSubmitted', 'string'], ['notify_emails', 'string'], ['pickup_discaunt_value', 'number'], ['post_discaunt_value', 'number'], ['courier_discaunt_value', 'number'], ['price_discount_percent', 'number']]);
 }
コード例 #18
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['themeColor'], 'string'], [['boxedBgImage'], 'string'], [['boxedLayout'], 'string'], [['boxedBgCss'], 'string']]);
 }
コード例 #19
0
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['isCacheEnabled'], 'boolean'], [['cacheTime', 'count'], 'number'], [['clientId', 'userName', 'tag'], 'safe']]);
 }
コード例 #20
0
ファイル: Money.php プロジェクト: skeeks-cms/cms-module-money
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['currencyCode'], 'string'], [['markupOnUpdate'], 'number']]);
 }
コード例 #21
0
ファイル: Cms.php プロジェクト: skeeks-cms/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['adminEmail', 'noImageUrl', 'appName', 'languageCode'], 'string'], [['adminEmail'], 'email'], [['adminEmail'], 'email'], [['passwordResetTokenExpire'], 'integer', 'min' => 300], [['registerRoles'], 'safe'], [['tree_max_code_length'], 'integer'], [['element_max_code_length'], 'integer']]);
 }
コード例 #22
0
ファイル: CmsSearchComponent.php プロジェクト: Liv1020/cms
 public function rules()
 {
     return ArrayHelper::merge(parent::rules(), [[['searchQueryParamName'], 'string'], [['enabledElementProperties'], 'string'], [['enabledElementPropertiesSearchable'], 'string'], [['phraseLiveTime'], 'integer'], [['searchElementFields'], 'safe'], [['searchElementContentIds'], 'safe']]);
 }