validation added

This commit is contained in:
Ranjan 2024-04-05 10:14:34 +05:45
parent 5cc42edcba
commit d36571ba7a
3 changed files with 11 additions and 3 deletions

View File

@ -24,7 +24,7 @@
<div class="col-lg-8">
<div class="card">
<div class="card-body">
<form action="{{ route('leave.store') }}" method="post">
<form action="{{ route('leave.store') }}" method="post" class="needs-validation" novalidate>
@csrf
@include('leave::partials.action')
</form>
@ -38,3 +38,7 @@
<!-- container-fluid -->
</div>
@endsection
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
@endpush

View File

@ -1,6 +1,10 @@
<div class="mb-3">
<label for="employeeName" class="form-label">Employee Name</label>
<input type="text" class="form-control" id="employeeName" placeholder="Enter emploree name" name="employeeName">
<input type="text" class="form-control" id="employeeName" placeholder="Enter emploree name" name="employeeName"
required>
<div class="invalid-feedback">
Please enter Employee Name.
</div>
</div>
<div class="mb-3">
<label for="employeeUrl" class="form-label">Employee Department URL</label>

View File

@ -138,7 +138,7 @@
<!-- Custom js -->
<script type="module" src="{{ asset('assets/js/custom.js') }}"></script>
@stack('js')
</body>
</html>