Skip to content

Releases: umayr/uranus

The Hunter Amazon

Choose a tag to compare

@umayr umayr released this 24 Sep 14:59

Change Log:

This release adds a new feature to generate validation error messages with name.

Before this, Uranus supported only subjectless messages. For e.g:

var rules = {
   isEmail: true
};
Uranus.validateOne('foo@..!!.com', rules);

// ['should be a valid email address.']

Now, theres a way to provide name and get complete error messages, like:

var rules = {
   isEmail: true
};
Uranus.validateOne({value: 'foo@..!!.com', name: 'Foo'}, rules);

// ['Foo should be a valid email address.']

The functionality is backward compatible meaning it should work either way
if I provide a name or not.

For validateAll, the name can be defined with name property, like:

var result = Uranus.validateAll([
        {
          value: 'foo',
          name: 'Foo',
          rules: {
            isEmail: true
          }
        }
      ], {
        includeName: true
      });

// ['Foo should be a valid email address.']

There is an option to turn this off with a flag like includeName.
The default value is true but if you don't provide a name it should
generate subjectless message.

The less elegant while providing an object is:

var src = {
    email: {
       name: 'Foo',
       value: 'foo@!!!.com'
   }
  };

  var rules = {
    email: {
      isEmail: true
    }
  }
Uranus.validateAll(src, rules);

// ['Foo should be a valid email address.']

The Mammoth General Lord

Choose a tag to compare

@umayr umayr released this 24 Sep 13:40

Change Log:

v1.4.1 doesn't bring a lot to the table but a very hot fix.

Fixes:
  • #15 - Validity issues.

The Orange Sniper Shadow

Choose a tag to compare

@umayr umayr released this 04 Sep 13:39
Changes from Previous Release - The Yellow Raccoon Cat
  • Addition of validateOne method. See #6
  • Addition of object literal support for validateAll. See #8
  • Fixed Object.assign bug.
  • Addition of syntactic static methods. See #9

The Yellow Raccoon Cat

Choose a tag to compare

@umayr umayr released this 03 Sep 15:57
Changes from Previous Release - The Infamous Beetle
  • Removal of old lib/ folder along with JSCS & JSHint configs.
  • Addition of dist/ folder to be ignored by git.
  • Removal of stupid grunt.
  • src/ folder to be ignored by npm.
  • Updated unit tests. They're now in ES6. ;3
  • Several changes in package.json:
    • Removed grunt & its dependencies.
    • Added scripts. (prepublish, pretest, build, test, eslint)
    • Added babel, babel-runtime & eslint
    • Updated test script. Now, mocha runs with Babel.
  • Whole new source in ES6.
  • Fixed #5
  • New structure:
 - src/
    - classes/  # contains all classes.
    - utils/    # contains extensions and other minor utility methods.

The Infamous Beetle

Choose a tag to compare

@umayr umayr released this 16 Aug 11:43

First major release. 🎉

Changes from previous release - The Crimson Hammer:

No drastic changes has been made since last release but a few worth mentioning points:

  • Separated core functionality from main index.js.
  • Moved extension methods into a separate file and added documentation for each of them.

Note: None of the previous functionality has been effected by these refactoring.

The Crimson Hammer

Choose a tag to compare

@umayr umayr released this 06 Aug 13:08

Added a new extension method
There is an addition of new extention method optional which takes two multiple parameters. It first checks whether or not the provided input is null if its not then it applies the second validation rule that is provided as the first parameter with rest of the params as its arguments.

Pretty helpful when you want to apply validation only when the value is not null, empty or undefined.

Converted from object to array
Returning items is now an array rather than obnoxious index based object.

Add progressive option
When true it will iterate through provided rules for a value but stop when there is only one invalid rule.

Cherry and Peanut Pie

Choose a tag to compare

@umayr umayr released this 04 Aug 16:11

Changed the way it keeps track of all values and rules according to their indexes rather then value name. Because it was useless in case of empty values.

Infused Rosemary & Onion Moussaka

Choose a tag to compare

@umayr umayr released this 04 Aug 15:37
  • Minor fixes.

Chocolate and Licorice Soufflé

Choose a tag to compare

@umayr umayr released this 04 Aug 15:32
  • Added notNull extension method.

Peach and Guava Waffles

Choose a tag to compare

@umayr umayr released this 04 Aug 11:55
  • Included minor bug fixes