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="col-lg-8">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<form action="{{ route('leave.store') }}" method="post"> <form action="{{ route('leave.store') }}" method="post" class="needs-validation" novalidate>
@csrf @csrf
@include('leave::partials.action') @include('leave::partials.action')
</form> </form>
@ -38,3 +38,7 @@
<!-- container-fluid --> <!-- container-fluid -->
</div> </div>
@endsection @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"> <div class="mb-3">
<label for="employeeName" class="form-label">Employee Name</label> <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>
<div class="mb-3"> <div class="mb-3">
<label for="employeeUrl" class="form-label">Employee Department URL</label> <label for="employeeUrl" class="form-label">Employee Department URL</label>

View File

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