/**
  * @param string $name
  * @param NodeParentInterface $parent
  */
 public function __construct($name, NodeParentInterface $parent = null)
 {
     parent::__construct($name, $parent);
     $this->validate()->ifTrue(function ($value) {
         $value = trim($value);
         return strpos($value, '..') !== false || strpos($value, '/') === 0;
     })->thenInvalid('path is not allowed');
 }
 /**
  * {@inheritDoc}
  */
 public function __construct($name, NodeParentInterface $parent = null)
 {
     parent::__construct($name, $parent);
     $this->nullEquivalent = true;
 }