Skip to content

Instantly share code, notes, and snippets.

@richbowen
richbowen / array-validation-error-mapping.php
Created June 25, 2023 23:30 — forked from webmozart/array-validation-error-mapping.php
A little experiment: Validating (potentially multi-leveled) arrays with the Symfony2 Validator component and returning the errors in the same data structure as the validated array by using the Symfony2 PropertyAccess component.
<?php
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\Choice;
use Symfony\Component\Validator\Constraints\Collection;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Optional;
use Symfony\Component\Validator\Constraints\Required;

Keybase proof

I hereby claim:

  • I am richbowen on github.
  • I am richbowen (https://keybase.io/richbowen) on keybase.
  • I have a public key ASA3yK03OyJswxCf1Xa5xWf773rI51CZcFWKZ2-6l1M8GQo

To claim this, I am signing this object:

Adminer Setup

Adminer is a great tool for managing many different kinds of databases. It is easy to set up and easy to use. In this tutorial, I'll be showing you how to set it up locally on your computer.

This tutorial is made specifically for Ubuntu and other Debian-based systems, however, with few adjustments, it can be made to work on other Linux distributions. Ok, let's get started.