Implement Validation.filter, close #1264