added tests for OptionalValidator