mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
restore min/max html constraints to passphrases
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
formControlName="numWords"
|
||||
id="num-words"
|
||||
type="number"
|
||||
[min]="numWordsMin"
|
||||
[max]="numWordsMax"
|
||||
(change)="save('numWords')"
|
||||
/>
|
||||
<bit-hint>{{ numWordsBoundariesHint$ | async }}</bit-hint>
|
||||
|
||||
@@ -114,6 +114,9 @@ export class PassphraseSettingsComponent implements OnInit, OnDestroy {
|
||||
this.wordSeparatorMaxLength = constraints.wordSeparator.maxLength;
|
||||
this.policyInEffect = constraints.policyInEffect;
|
||||
|
||||
this.numWordsMin = constraints.numWords.min;
|
||||
this.numWordsMax = constraints.numWords.max;
|
||||
|
||||
this.toggleEnabled(Controls.capitalize, !constraints.capitalize?.readonly);
|
||||
this.toggleEnabled(Controls.includeNumber, !constraints.includeNumber?.readonly);
|
||||
});
|
||||
@@ -128,6 +131,12 @@ export class PassphraseSettingsComponent implements OnInit, OnDestroy {
|
||||
.subscribe(settings);
|
||||
}
|
||||
|
||||
/** attribute binding for numWords[min] */
|
||||
protected numWordsMin: number;
|
||||
|
||||
/** attribute binding for numWords[max] */
|
||||
protected numWordsMax: number;
|
||||
|
||||
/** attribute binding for wordSeparator[maxlength] */
|
||||
protected wordSeparatorMaxLength: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user