When a name is used as the array key, using this name, the behavior can later be retrieved using getBehavior() Behaviors can be attached using a name or anonymously. Note that a behavior class must extend from yii\base\Behavior. The behavior class or an array of the following structure: 'behaviorName' => [ A behavior configuration can be either a string specifying The return value of this method should be an array of behavior objects or configurations Returns a value indicating whether the validator is active for the given scenario and attribute.ĭetaches an existing event handler from this component.ĭefined in: yii\base\Component::behaviors()Ĭhild classes may override this method to specify the behaviors they want to behave as. Returns a value indicating whether a property is defined for this component. Returns a value indicating whether a method is defined. Returns a value indicating whether there is any handler attached to the named event. Returns a list of attributes this validator applies to. Returns the client-side validation options. Returns all behaviors attached to this component. Returns cleaned attribute names without the ! character at the beginning. Makes sure that the behaviors declared in behaviors() are attached to this component. Returns the JavaScript needed for performing client-side validation.ĭetaches all behaviors from the component. Returns the fully qualified name of this class. Returns a value indicating whether a property can be set. ![]() Returns a value indicating whether a property can be read. Returns a list of behaviors that this component should behave as. defined and not null.Īdds an error about the specified attribute to the model object.Īttaches a list of behaviors to the component. Returns the value of a component property.Ĭhecks if a property is set, i.e. This method is called after the object is created by cloning an existing one. User-defined error message used when the length of the value is smaller than $min.Ī PHP callable whose return value determines whether this validator should be applied.Ī JavaScript function name whose return value determines whether this validator should be applied on the client-side.Ĭalls the named method which is not a class method. User-defined error message used when the length of the value is greater than $max. Whether to require the value to be a string data type. Whether this validation rule should be skipped if the attribute being validated already has some validation error according to some previous rules. Whether this validation rule should be skipped if the attribute value is null or an empty string. Scenarios that the validator can be applied to. User-defined error message used when the length of the value is not equal to $length. User-defined error message used when the value is not a string. Specifies the length limit of the value to be validated. Scenarios that the validator should not be applied to.Ī PHP callable that replaces the default implementation of isEmpty(). The encoding of the string value to be validated (e.g. Whether to enable client-side validation for this validator. List of built-in validators (name => class or configuration) List of behaviors attached to this component. ![]() ![]() Application AssetBundle AssetConverter AssetConverterInterface AssetManager BadRequestHttpException CacheSession CompositeUrlRule ConflictHttpException Controller Cookie CookieCollection DbSession ErrorAction ErrorHandler ForbiddenHttpException GoneHttpException GroupUrlRule HeaderCollection HeadersAlreadySentException HtmlResponseFormatter HttpException IdentityInterface JqueryAsset JsExpression JsonParser JsonResponseFormatter Link Linkable MethodNotAllowedHttpException MultiFieldSession MultipartFormDataParser NotAcceptableHttpException NotFoundHttpException RangeNotSatisfiableHttpException Request RequestParserInterface Response ResponseFormatterInterface ServerErrorHttpException Session SessionIterator TooManyRequestsHttpException UnauthorizedHttpException UnprocessableEntityHttpException UnsupportedMediaTypeHttpException UploadedFile UrlManager UrlNormalizer UrlNormalizerRedirectException UrlRule UrlRuleInterface User UserEvent View ViewAction XmlResponseFormatter YiiAsset yii\widgetsĪttributes to be validated by this validator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |