Modify

Ticket #85 (new enhancement)

Opened 4 years ago

Last modified 3 years ago

more flexible setting of validators

Reported by: mpo Owned by: mpo
Priority: minor Milestone: 0.5
Component: modules/kauri-forms Version: trunk
Keywords: Cc:

Description

Currently the field-config expects validators (or @validators) to be passed in an object structure which allows easy config of extension:

validators : { 'integer': {}, 'range': {max: 5}}

it would be nice to also support a more flexible notation:

validators: 'integer'                         // eq to current {integer:{}}
validators: ['integer', 'required']           // eq to current {integer:{}, required:{}}
validators: ['integer', {range: {max: 5}}]    // eq to sample above

Attachments

Change History

comment:1 Changed 3 years ago by mpo

  • Milestone changed from 0.3 to 0.5

beyond scope of 0.4

View

Add a comment

Modify Ticket

Action
as new
Author


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

 
Note: See TracTickets for help on using tickets.