pfRemainingCharsCount
patternfly.form
Directive for showing a characters remaining count and triggering warning and error
behavior when passing specified thresholds. When the chars-warn-remaining
threshold is passed,
the chars-warn-remaining-pf
css class is applied to the count-fld
, which by default, turns
the remaining count number red.
By default, characters may be entered into the text field after the chars-max-limit
limit has been reached,
the remaining count number will become a negative value. Setting the blockInputAtMaxLimit
to true,
will block additional input into the text field after the max has been reached; additionally a right-click 'paste' will only
paste characters until the maximum character limit is reached.
<ANY pf-remaining-chars-count ng-model="{string}" count-fld="{string}" chars-max-limit="{string}" chars-warn-remaining="{string}" [block-input-at-max-limit="{boolean}"]> ... </ANY>
Param | Type | Details |
---|---|---|
ng-model | string | The scope model variable which contains the initial text for the text field. Required, but can be an emptly string (""). |
count-fld | string | The id of the field to display the 'characters-remaining' count. |
chars-max-limit | string | Number representing the maximum number of characters to allow before dispatching a |
chars-warn-remaining | string | Number of remaining characters to warn upon. The 'chars-warn-remaining-pf' |
block-input-at-max-limit (optional) | boolean | If true, no more characters can be entered into the text field when the |