-
Notifications
You must be signed in to change notification settings - Fork 299
Closed
Description
Hi
Im trying to extend existing validator but I get typeerror because of wrong scope
Is there any way I can do this so that it works?
How would I extend the default set of validators to add this so that I can use it in other places in my app?
Thanks
multipleEmails: (value, attr, computedState) ->
emails = if value then value.split(',') else []
for email in emails
foo = Backbone.Validation.validators.pattern email, attr, 'email', @
return "#{attr} must contain a comma separated list of emails" unless foo
''
Metadata
Metadata
Assignees
Labels
No labels