Someone can tell me why my code doesn't work please ??
I get "this.username is undefined" and i don't really understand why...
Here the code :
riot.tag2('test', '<input type="text" name="username" placeholder="username" oninput={validate} value="" /> <h4>{username_valid}</h4>', '', '', function(opts) {
this.validate = function(e) {
this.username_valid = (this.username.value.length > 3) ? 'Valid' : 'Invalid'
};
});
Thanks for your help..