Validate sort order