Skip to content

ValidationErrors map populated with duplicate values on validation #11

@milkmangames

Description

@milkmangames

Have a subclass of ufront.db.Object with 4 fields.

Create a new instance and set each field to a value that will not validate (null):

var myObject=new MyObject();
myObject.field1=null;
myObject.field2=null;
myObject.field3=null;
myObject.field4=null;

object.validate();
trace(object.validationErrors);

Result: for each key, the validation error is repeated 4 times, i.e.:

[ field1: [ "field1 is a required field", "field1 is a required field", "field 1 is a required field", "field1 is a required field"] ] 

...and so on.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions