Implement validation using ActiveModel.