Skip to content

Commit

Permalink
do not break if the user add empty lines in the links textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Jan 24, 2025
1 parent dae917a commit 0971184
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class CreateLinkComponent {
link: new FormControl<string>('', { nonNullable: true, validators: [Validators.pattern(/^http(s?):\/\//)] }),
links: new FormControl<string>('', {
nonNullable: true,
validators: [Validators.pattern(/^([\r\n]*http(s?):\/\/.*?)+$/)],
validators: [Validators.pattern(/^(([\r\n]*http(s?):\/\/.*?)|\n)+$/)],
}),
linkTo: new FormControl<'web' | 'file'>('web', { nonNullable: true }),
type: new FormControl<UploadOption>('one', { nonNullable: true }),
Expand Down

0 comments on commit 0971184

Please sign in to comment.