Nothing special:
CustomerInputFilter extend Zend\InputFilter\InputFilter {}
But you can also register a new element and create a factory:
'validators' => [
'factories' => [
My\Validator\CustomerRecordExists::class => My\Validator\CustomerRecordExistsFactory::class,
],
],
The class CustomerRecordExists
must not exists and in the factory you use the standard RecordExists
class and set the database adapter. Now you can use it in you input-filter configuration.
(This suggestion is based an the fact that your customers always in the same database.)