sorting validations