Add sort_by validation