Open bobKasbi opened 4 years ago
AFAIK, this is not a valid url.
It's an alias of a IP, it should has a domain to be valid.
Yes, it's endpoint of an API. We use a form input text to pass it to BE. Is there an attribute or HTML5 data-attribute for the input text to allow such kind of URL, or something similar?
Example:
<input type="text" [(ngModel)]="model.field" name="field" #field="ngModel" data-url="validate-api-endpoint" url>
or:
<input type="text" [(ngModel)]="model.field" name="field" #field="ngModel" data-url="allow-api-endpoint" url>
Any news here? Would be great if it's possible to add a kind of options such: https://github.com/validatorjs/validator.js
Ralf, I think if you allow any IP address, then localhost should be allowed too as it is a well known alias for 127.0.0.1.
Other the other sire, Bob, if you want, you can add in your /etc/hosts a FQDN with localhost as IP: e.g: www.bobkasbi.com 127.0.0.1 and use this "fake" FQDN in your code, rather than localhost.
Current behavior
When I add the following URL:
https://localhost:4200/xxxxx
in the text filed, the url is not valid.Expected/desired behavior
This URL:
https://localhost:4200/xxxxx
should be valid and accepted by the validatorEnvironment information
Angular CLI: 8.3.8 Node: 12.13.0 OS: darwin x64 Angular: 8.2.14 NPM: 6.12.0 Typescript: 3.4.5
Other information