Skip to content

Instantly share code, notes, and snippets.

View Macsch15's full-sized avatar

Maciej Schmidt Macsch15

View GitHub Profile
@Macsch15
Macsch15 / AdsTxtRegex
Last active June 27, 2019 09:58
Ads.txt Regex Validation
/((CONTACT|SUBDOMAIN)=(.*?)+)|(#(.*)+)|(.*?)(\s+)?\,(\s+)?(.*?)(\s+)?\,(\s+)?(DIRECT|RESELLER)((\s+)?\,(\s+)?.*)?(\r)?\n/
@Macsch15
Macsch15 / error_blade_directive.php
Created March 28, 2019 21:43 — forked from calebporzio/error_blade_directive.php
A little Blade directive to make working with validation errors a bit nicer.
<?php
// Usage:
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After: