I have registered a callback for a 'change' event, and in this callback I need to set some validation ad eventually change some properties but that would lead to a stack overflow:
@bind 'change', -> @set 'valid', @isValid() # just a small example, I do lots of stuff here.
isValid:
validate()
@get('prop')
validate:
@set('prop') @get('prop')?.trim() # or @attributes.prop = @get('prop').trim(), doesn't matter
How can I change an attribute preventing the 'change' event to trigger?