Ticket #239 (closed defect: invalid)

Opened 10 months ago

Last modified 4 months ago

validation should not stop on first error

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

Description

Sometimes there is more then one validation error in which case it's a bit odd to only show the first error and force the user to submit again before showing the next issue.

(recreated from #217 which got removed after comment-spam)

Attachments

Change History

Changed 7 months ago by jgou

  • priority changed from minor to critical

Changed 5 months ago by freya

Defect seems invalid.

Created a form with 2 controls and 2 validators:

'isSmallerThenOther':

{

validate : function( value) {

if ($.isEmpty(value))

return this.notifySuccess();

var other = basicForm.findControl('/v2'); var otherValue = other.getValue(); if(otherValue && otherValue < value)

return this.notifyFail("i18n:Should be smaller then the other value!");

return this.notifySuccess();

}

} ,

'isPositive':

{

validate : function( value) {

if ($.isEmpty(value))

return this.notifySuccess();

if (value < 0)

return this.notifyFail("i18n:Should be positive!");

return this.notifySuccess();

}

}

everything acts as espected.

Changed 5 months ago by freya

  • status changed from new to closed
  • resolution set to invalid

Changed 5 months ago by idbr

I don't think this issue is invalid. With the following form

  members: {
    'test1': {
      base: 'string',
      '+validators': { 'required': {} }
    },
    'test2': {
      base: 'string',
      '+validators': { 'required': {} }
    }
  }

on kauri r1504, when i press submit, only for the first input field a warning is displayed. Tested in FF3.6.3, IE7 and Chrome4.1.

Changed 4 months ago by mpo

Checking up this should have received a fix in r1505

Add/Change #239 (validation should not stop on first error)

Author


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


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.