Skip to content

Instantly share code, notes, and snippets.

@florinutz
Created September 25, 2014 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florinutz/4ee173d6687c9c0e5209 to your computer and use it in GitHub Desktop.
Save florinutz/4ee173d6687c9c0e5209 to your computer and use it in GitHub Desktop.
frequency:
- [ P2D, 5 ]
- [ T13M, 20 ]
@wouterj
Copy link

wouterj commented Sep 25, 2014

<?php
$root
    ->children()
        ->arrayNode('frequency')
            ->prototype('array')
                ->validation()
                    ->ifTrue(function ($node) { return count($node) !== 2; })
                    ->thenInvalid('Frequency should have arrays with length 2')
                ->end()
            ->end()
        ->end() // frequency
    ->end();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment