Updated period validation for sort order