Skip to content

Commit

Permalink
chore: fix input validation and add maxLength message
Browse files Browse the repository at this point in the history
  • Loading branch information
illfixit committed Mar 11, 2024
1 parent eb843b2 commit 51c223b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Contributors:
* sovity GmbH - initial implementation
*/

import {Component, HostBinding, Input} from '@angular/core';
import {FormControl} from '@angular/forms';

Expand Down Expand Up @@ -43,4 +42,7 @@ export class TextInputComponent {

@Input()
invalidPatternMessage = 'Input does not fit pattern.';

@Input()
maxLengthMessage = 'Input exceeds maximum length.';
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ export class RegisterCentralComponentPageForm {
],
frontendUrl: [
initial.componentTab.frontendUrl,
[Validators.required, , Validators.maxLength(128), urlValidator],
[Validators.required, urlValidator, Validators.maxLength(128)],
],
endpointUrl: [
initial.componentTab.endpointUrl,
[Validators.required, Validators.maxLength(128), urlValidator],
[Validators.required, urlValidator, Validators.maxLength(128)],
],
});

Expand Down

0 comments on commit 51c223b

Please sign in to comment.