Converted the validators to classes