0

Using ZF2 \Zend\Validate, is it possible to validate a date only if it is a weekday? So weekends, regardless of month or year, will fail the validation?

The input is a normal text field.

John Crest
  • 201
  • 1
  • 4
  • 24

1 Answers1

0

I don't think that Zend\Validate has already a validator to check that.

You'll probably need to write your own custom validator to do your check.

Have a look at this answer to see how to perform the actual check (actually that answer check the converse, but it'll be easy to adapt it)

Community
  • 1
  • 1
marcosh
  • 8,780
  • 5
  • 44
  • 74