Skip to content

Commit

Permalink
Merge pull request #525 from bcgov/oleks
Browse files Browse the repository at this point in the history
DSS-324: Takedown Request and Non Compliance notices issues
  • Loading branch information
ychung-mot authored Aug 12, 2024
2 parents fbfb9c4 + 277abce commit ffb876d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/common/consts/validators.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function validateUrl(): ValidatorFn {
return null;
}

const urlRegex = new RegExp(/\b(?:[Hh][Tt][Tt][Pp][Ss]?):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[-A-Za-z0-9+&@#\/%=~_|]/);
const urlRegex = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/);
const validUrl = urlRegex.test(url.toLowerCase());

return validUrl ? null : { invalidUrl: true };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class DelistingRequestComponent implements OnInit {

private initForm(): void {
this.myForm = this.fb.group({
platformId: [0, Validators.required],
platformId: [null, Validators.required],
listingId: [''],
listingUrl: ['', [Validators.required, validateUrl()]],
sendCopy: [true],
Expand Down

0 comments on commit ffb876d

Please sign in to comment.