implements validator as an array of values