Skip to content

Relation Validation

Jeff Greene edited this page Mar 24, 2020 · 1 revision

WIP

Purpose

Custom

Custom Validation Codegen uses this validation hook to perform its generated validations. in order to combine custom validation with codegenerated validation, you can instead implemented the following partial method on a data object.

private partial method ValidateCustom, void
  required in vType, ValidationType
  required in sp, @IServiceProvider
endmethod

Customization file

put, patch, post, delete applications codegen concepts

  • required - valid for all data types, applied when a repository field has "required" checked
  • length - alpha fields have a max length
  • number range - valid for numeric data types, applied when a repository field has a value for "range minimum" or "range maximum"
  • non negative - valid for numeric data types, applied when a repository field is not marked as "negative allowed"
  • requires relation match - this type of validation represents things like an order must always have a customer, or an order must have order items. error messages examples of significant customization
Clone this wiki locally