Validator callback message #31

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

Now it allows the callback(message) within a validator to be put inside the Error[x].message instead of ''.

Test added to cover this case and all tests pass.

Best,
Barret

Owner

Baggz commented Mar 15, 2012

Hi,

a new version of Amanda (v0.4.0) has been released. Now, you can call the this.addError(message) method within an attribute.

Here is an example.

/**
 * MyAttribute
 */
var myAttribute = function(property, propertyValue, attributeValue, propertyAttributes, callback) {

  if ( ... ) {
   this.addError('Lorem ipsum dolor isamet error!');
  }

  // Continue...
  return callback();

};

@Baggz Baggz closed this Dec 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment