backbone-forms icon indicating copy to clipboard operation
backbone-forms copied to clipboard

What "err.type" used for?

Open karolymarton opened this issue 12 years ago • 2 comments

https://github.com/powmedia/backbone-forms/blob/master/src/validators.js#L29

      var err = {
        type: options.type,
        message: _.isFunction(options.message) ? options.message(options) : options.message
      };

"type" is too common to search for in the code...

karolymarton avatar Nov 28 '14 09:11 karolymarton

for showing the type of failure, Required, Regexp, custom validator etc. git grep err.type would help narrow it down

exussum12 avatar Nov 28 '14 11:11 exussum12

Thank you! As I see only tests use it.

karolymarton avatar Dec 03 '14 12:12 karolymarton