ngFormBuilder icon indicating copy to clipboard operation
ngFormBuilder copied to clipboard

"component" not available in "custom validation"

Open StefanHoutzager opened this issue 8 years ago • 1 comments

For example in the definition of a custom validation of a select component you can see "The global variables input, component, and valid are provided.". But when I put

console.log(component)
valid = true

in the editor I get runtime "component is not defined" in red letters below the element. For global variable input the console.log works as expected. But what I would really like to have is a way to change the label of another element in the form depending on the input value of this select. Do you have a suggestion on how to accomplish this?

StefanHoutzager avatar Jan 18 '17 15:01 StefanHoutzager

@StefanHoutzager you can use scope.component for now, I'll add an issue to the backlog to make it a bit simpler. Thanks for the report!

zackurben avatar Mar 29 '17 22:03 zackurben