FormsBootstrap

A Laravel library to generate forms based on Laravel Collective Forms & HTML, Boostrap 5 CSS Framework, RichText editor, and Icons provided by FontAwesome. Current version: 3.1.1. Project on GitHub. Project on Packagist. Manages also results inputs of packages DateRangePickerHelper, Uploader, and Tags input. Includes form management and validation. This demosite sources available here.

Email input



{!! Form::email(); !!}
{!! Form::bsEmail([
  'id' => 'email2', //field
  'name' => 'email2', // required if different from 'email'
  'labeltext' => 'E-mail 2',
  'required' => true // value will be validated on submit
]) !!}

Output:
<div class="mb-3" id="fg-email">
<label for="email" class="form-label">E-mail</label>
<input type="email" name="email" value="" id="email" class="form-control verify-email resettext" />
</div>
<script>
jQuery("#email").sebEmailHelper({emailregex : /^(([^<>()[\]\.,;:\s@"]+(\.[^<>()[\]\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/});
</script>
<div class="mb-3" id="fg-email">
<label for="email2" class="form-label">E-mail 2</label>
<input type="email" name="email" value="" id="email2" class="form-control verify verify-email resettext" />
<div class="invalid-feedback">Email is invalid or empty</div>
</div>
<script>
jQuery("#email2").sebEmailHelper({emailregex : /^(([^<>()[\]\.,;:\s@"]+(\.[^<>()[\]\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/});
</script>



Email is invalid or empty


Results