Modify

Opened 2 years ago

Closed 14 months ago

Last modified 11 months 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 14 months ago.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 2 years ago by skyper

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

For actions see #3496.

comment:2 Changed 2 years ago by simon04

Milestone: 20.0420.05

comment:3 Changed 2 years ago by Klumbumbus

Milestone: 20.0520.05old

Milestone renamed

comment:4 Changed 2 years ago by Klumbumbus

Milestone: 20.05old20.05

comment:5 Changed 2 years ago by simon04

Milestone: 20.0520.06

comment:6 Changed 23 months ago by simon04

Milestone: 20.06Longterm

comment:7 Changed 14 months ago by simon04

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

comment:8 Changed 14 months ago by simon04

In 17642/josm:

see #19078 - Common interface TagCondition

comment:9 Changed 14 months ago by simon04

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.

Changed 14 months ago by simon04

comment:10 Changed 14 months ago by simon04


comment:11 Changed 14 months ago by simon04

In 17651/josm:

see #19078 - Preset preference: extract property constants

comment:12 Changed 14 months ago by simon04

In 17652/josm:

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

comment:13 Changed 14 months ago by simon04

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.

comment:14 in reply to:  12 Changed 14 months ago by skyper

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 Changed 14 months ago by simon04

@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 Changed 14 months ago by skyper

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 Changed 11 months ago by skyper

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.