This commit is contained in:
@@ -56,7 +56,10 @@ todo: child collection items error / rule / customization handling
|
||||
where ParentCollectionName is exactly the same as the Model collection property name and
|
||||
FieldName is exactly the same as the child collection objects Model property name
|
||||
Update RequiredFieldsValidator to look for these period seperated items and navigate through teh collection by name / reflection to step through children and flag errors to include parent
|
||||
e.g in validation error field name would be "poitems.vendorpartnumber" to indicate poitems collection vendorpartnumber field and set childitems index property (new) to 3 to indicate 4th row (0based)
|
||||
e.g in purchase order record, validation error for not entering required Ordered quantity
|
||||
"target" field name would be "items[0].quantityOrdered" to indicate poitems collection quantityOrdered field and items[0] indicates the first record in the collection
|
||||
Note that this is how the built in validation for Model Required rules operates and that's useful so mirroring it even though it's a little harder to parse it saves a lot of dev time
|
||||
as data annotations will be supported as is
|
||||
Update ValidationError.cs class, add index property and use it for above
|
||||
Update BizObject.cs add error methods that include index for use with indexed collection item errors
|
||||
Update client gzform.cs server errors handler to handle indexed child collection like that and report error on row and in popup edit form
|
||||
|
||||
Reference in New Issue
Block a user