I've encountered a challenge with an input box that has an ng-pattern for link validation. Our project manager has requested that the text 'http://' be pre-filled in the input field, but doing so breaks the ng-pattern validation and prevents it from displaying.
<input type="text" ng-model="$parent.emailData.setting.button[2].link"
name="button2link"
ng-class="{invalid: step3Form.button2link.$invalid}"
ng-pattern="link_pattern"/>
To provide context, the link pattern is defined as
$rootScope.link_pattern = /(https?:\/\/)(www)?[A-Za-z0-9.\-@_~]+\.[A-Za-z]{2,}(:[0-9]{2,5})?(\/[A-Za-z0-9\/_\-.~?&=]*)*/
I'm restating my question to clarify (it's not about styles, which are already functioning) Is there a way to include the actual text 'http://' in the input field without using a placeholder, while still enforcing the link pattern validation?
I want the text 'http://' to automatically appear in the input field when the user sees it (currently just a placeholder) so they don't have to type it themselves.