fix array validation and allowedValue checking