Skip to content

Instantly share code, notes, and snippets.

View batbaatap's full-sized avatar
Working from home


Working from home
View GitHub Profile
batbaatap / index.html
Created August 12, 2019 06:14
Vue array multi-filter
<div id="app">
<template v-for="tag in tags">
<input type="checkbox" value="{{ tag }}" v-model="selectedTags" id="tag-{{ tag }}">
<label for="tag-{{ tag }}">{{ tag }}</label>
<p v-show="selectedTags.length != 0">
Filters: <span v-for="tag in selectedTags" class="label">{{ tag }}</span>
<li v-for="card in activeCards">{{ }}</li>
batbaatap / validation.php
Last active May 9, 2021 03:19
Date, check id in table
'bookings' => 'required|array|min:1',
'bookings.*.hotelId' => 'required|exists:pm_hotel,id', // check id in pm_hotel
'bookings.*.from' => 'required|date',
'bookings.*.to' => 'required|date|after:bookings.*.from',
'bookings.*.night' => 'required|numeric|min:0|not_in:0',
'customer.first_name' => 'required|min:2',