Aurelia-validator - customize behavior -


i'm using aurelia-validation plugin. locate validation message beside control validate. wonder if mentioned below approach best approach, if feasible or maybe validationcontroller offers better way: use validationrules api check several controls. each of controls - locate span (used hard coded text, not) beside control. bind variabl\proeprty in view-model.lets call registration.firstnameisvalid (for firstname). variable set function check whether instance of validationcontroller has error property name control self:

this.controller.errors.some(errorval => errorval.propertyname == propertyname) 

should locate variable\property in event function change of control value (focus out\blur) ?

i same error message binded span text (innerhtml).

is behavior right 1 ?


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -