<?php
namespace Moto\Application\Installation\InputFilter; use Moto\InputFilter\AbstractInputFilter; class ProductInfo extends AbstractInputFilter { public function init() { parent::init(); $this->add(array( 'name' => 'product_id', 'required' => true, 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[a-z0-9]{32,}$/i', ) ), ), )); $this->add(array( 'name' => 'template', 'required' => true, 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[0-9]{5,}$/', ) ), ), )); $this->add(array( 'name' => 'token', 'required' => true, 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[a-z0-9\/\+\=\:\@\.]{48,}$/i', ) ), ), )); $this->add(array( 'name' => 'synced_at', 'required' => true, 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[0-9]{5,}$/', ) ), ), )); $this->add(array( 'name' => 'request_sign', 'required' => true, 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[a-z0-9\/\+\=\:]{8,}$/i', ) ), ), )); } }