Created validator class