basic validator method