I want to make https or http optional in my url type input field. But I always get invalid format error. I've tried regex pattern as well, but no luck.
HTML Code:
<lightning-input type="url" value={value} class="slds-p-horizontal--xx-small" variant="label-hidden" pattern="((ftp|http|https):\/\/)?" name="input1" onblur={updateValue} onchange={updateValue} disabled={isdisabled}></lightning-input>
JS Code:
updateValue(event) {
this.value = event.target.value;
}