Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#19078 closed enhancement (fixed)

Presets: validate user input (w.r.t. regexp/validator)

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 21.03
Component: Core Version:
Keywords: presets input validation regexp Cc:

Description

  • Inserting width=2,5 in the Highway/Ways/Track preset should immediately give me the validation warning "unusual value of width: use . instead of , as decimal separator"
  • Inserting maxspeed=50 km/h in the Highway/Ways/Residential preset should immediately give me the validation warning "unusual value of maxspeed"
  • Inserting an invalid opening_hours value should immediately give me a corresponding validation warning

Colouring the background of the text/combo inputs in green (for successful validation) or in red (for unsuccessful validation) would be very helpful.

The question is how to tie the validation checks to the key/value in the preset dialog

Attachments (1)

Screenshot 2021-03-23 at 00.16.41.png (218.7 KB ) - added by simon04 3 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by skyper, 4 years ago

Why restrict this to presets. Add tag and Change value could profit, too.

For actions see #3496.

comment:2 by simon04, 4 years ago

Milestone: 20.0420.05

comment:3 by Klumbumbus, 4 years ago

Milestone: 20.0520.05old

Milestone renamed

comment:4 by Klumbumbus, 4 years ago

Milestone: 20.05old20.05

comment:5 by simon04, 4 years ago

Milestone: 20.0520.06

comment:6 by simon04, 4 years ago

Milestone: 20.06Longterm

comment:7 by simon04, 3 years ago

Milestone: Longterm21.03
Owner: changed from team to simon04
Status: newassigned

comment:8 by simon04, 3 years ago

In 17642/josm:

see #19078 - Common interface TagCondition

comment:9 by simon04, 3 years ago

In 17643/josm:

see #19078 - Presets: validate user input (using MapCSSTagChecker, OpeningHourTest)

This feature is disabled by default and can be activated by setting the advanced preference taggingpreset.validator to true.

comment:10 by simon04, 3 years ago


comment:11 by simon04, 3 years ago

In 17651/josm:

see #19078 - Preset preference: extract property constants

comment:12 by simon04, 3 years ago

In 17652/josm:

see #19078 - Preset preference: checkbox for validate user input

comment:13 by simon04, 3 years ago

Resolution: fixed
Status: assignedclosed

Done for the 21.03 milestone. Depending on the feedback, I'm considering to enable this feature by default in one of the next milestones.

in reply to:  12 comment:14 by skyper, 3 years ago

Replying to simon04:

In 17652/josm:

see #19078 - Preset preference: checkbox for validate user input

Actually, I would prefer to have settings for tagging presets, map paint styles and imagery all in an own, separate tab within the corresponding preferences' register, keeping a consistent look of the first tab of these register. Validator might be another candidate as atm settings and tests are combined in the first tab.

comment:15 by simon04, 3 years ago

@skyper, no objections. Since this is only loosely related to this enhancement and will not make it into milestone:21.03, please open a separate ticket. Thanks!

comment:16 by skyper, 3 years ago

No problem, see #20688 and #20689.

As documentation needs some updates, I was just asking before creating new screenshots and changing the structure of the wiki pages.

comment:17 by skyper, 3 years ago

Does not work with all tests/rules, see #21041.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.