Skip to content

Control when user inputs an invalid range of pages #4

@idircarlos

Description

@idircarlos

In the regularexpr module, we have a function that parse the range of pages. It returns None when the input is invalid.
The input is invalid when the there is any invalid range. An invalid range occurs when the bottom value is greater than the top one.
Valid inputs:

  • 1,3,5-10,20,21
  • 1,2,4-10,3, 12-15

Invalid inputs:

  • 1-5,7,9-11,15-13
  • 1-9, 12-10

Display an alert box if the return of the function is None, explaining that the input line was wrong.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions