Adds validation for array attributes