Skip to content

Releases: vivin/regula

Regula 1.3.4

08 Feb 01:27
Compare
Choose a tag to compare

Regula Version 1.3.4

Changes and New Features

  • None

Bug fixes

  • regula.validate does not erroneously throw an error in certain cases (e.g., when trying to validate single element in a group when multiple groups exist). See issue #73 for more details.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor
  • Jeff Rose / contributor
  • Justin Simms / contributor
  • Michaël Witrant / contributor

Regula 1.3.3

08 Apr 22:30
Compare
Choose a tag to compare

Regula Version 1.3.3

Changes and New Features

  • regula.validate now accepts and fires the callback even in cases where there are only synchronous constraints. This was done to handle the situation where the user is unsure if the set of constraints to be validated contains any asynchronous constraints. See issue #68 for more details.

Bug fixes

  • regula.validate and regula.bind do not throw errors if any of the input elements of a form have a name attribute that is the same as a form attribute or native property. See issue #69 for more details.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor
  • Jeff Rose / contributor
  • Justin Simms / contributor
  • Michaël Witrant / contributor

Regula 1.3.2

03 Feb 22:49
Compare
Choose a tag to compare

Regula Version 1.3.2

Changes and New Features

  • None

    Bug fixes

  • regula.unbind doesn't throw an error when one of the supplied elements has been bound to some of all-defined groups.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor
  • Jeff Rose / contributor
  • Justin Simms / contributor
  • Michaël Witrant / contributor

Regula 1.3.1

15 Jan 22:48
Compare
Choose a tag to compare

Regula Version 1.3.1

Changes and New Features

  • None

    Bug fixes

  • @Email Doesn't report a false positive for text that may contain an email. The regular expression that tests for an email has been changed to start matching from the beginning of the string to the end of the string.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor
  • Jeff Rose / contributor
  • Justin Simms / contributor
  • Michaël Witrant / contributor

Regula 1.3.0

11 Sep 23:58
Compare
Choose a tag to compare

Regula Version 1.3.0

Changes and New Features

  • Added @Step and @URL constraints.
  • HTML5 validation support.*
  • Asynchronous validation.
  • AMD support (by Jeff Rose).
  • Validator functions for existing constraints are available from within a validation function. This makes it easy to create conditional validators and promotes reuse.
  • Added regula.isBound, which lets you know if an element has been bound to the specified constraint and/or group.
  • Custom, compound, and overridden constraints now honor the validateEmptyFields and ignoreEmpty flags.
  • regula.validate is a little less strict now. When specifying constraints and/or groups to regula.validate, the function will not throw an error if there are no elements that have been bound by the specified constraint(s), or if there are no elements in the specified group(s). However, regula.validate will still throw an error if an element is specified with a constraint and/or group, and the element is not bound by the specified constraint(s), or if the element does not belong to the specified group(s).

*Regula does not emulate HTML5 validation constraints; it is not a shim. HTML5 validation constraints involve validation logic as well as UI components, which would be out of the scope of what Regula is trying to achieve. If your browser natively-supports HTML5 validation, or if you are using a shim, Regula will recognize HTML5 validation constrains and validate those elements accordingly.

Bug fixes

  • @Length now honors the validateEmptyFields and ignoreEmpty flags (by Justin Simms).
  • @Checked now works with radio-button groups that have square brackets in the name attribute. Previously this did not work as expected. (by Michaël Witrant)
  • Specifying groups for multiple elements with regula.bind used to fail with an error. This has been fixed.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor
  • Jeff Rose / contributor
  • Justin Simms / contributor
  • Michaël Witrant / contributor

Regula 1.2.3

03 Jul 22:07
Compare
Choose a tag to compare

Regula Version 1.2.3

Changes and New Features

  • Regula now has a jQuery plugin!
  • Added regula.unbind. Provides the ability to unbind constraints from elements.
  • Added @Length, @Digits, @Past, and @Future, @AlphaNumeric, @Integer, and @Real constraints.
  • Added the ability to provide configuration options to Regula using regula.config.
  • Added the option to ignore or perform validation on empty fields using the validateEmptyFields configuration option. This can be controlled on a constraint-by-constraint basis by using the ignoreEmpty parameter.
  • Provided an easy way to validate radio groups.
  • Changes to regula.validate to make it easy to validate a subset of elements.
  • Removed Is prefix on @IsAlpha and @IsNumeric. These are deprecated and aliased to @Alpha and @Numeric.
  • Updated wiki.
  • Over 2,300 assertions with 97% test coverage (100% coverage effectively).

Bug fixes

  • Positive detection of cyclical composition doesn't leave composition graph in a broken state.
  • Fixed a bug where constraint arguments and values were being compared as Strings instead of Floats.
  • Made email validation case insensitive.
  • Fixed IE7 bug by using .charAt instead of array syntax.
  • Uses the data-constraints attribute to detect elements that need to be validated by Regula instead of using the regula-validation class name.
  • Fixed an bug where regula.validate would break if a bound element has been deleted.

Credits

  • Vivin Paliath / author
  • Troy J. Ingram / contributor
  • Pedro Rivarola / contributor
  • dreignier / contributor

Regula 1.2.2

03 Jul 21:44
Compare
Choose a tag to compare

Regula Version 1.2.2

Changes and New Features

  • None

Bug fixes

  • Detects existence of native getElementsByClassName before trying to call manual version. This improves performance on browsers that have a native version of the function.

Credits

  • Vivin Paliath / author

Regula 1.2.1

03 Jul 21:40
Compare
Choose a tag to compare

Regula Version 1.2.1

Changes and New Features

  • Added the ability to define compound constraints, i.e., constraints that contain other constraints. These can be nested to an arbitrary degree, but cannot be cyclical.
  • Various internal refactors to clean up the code.

Bug fixes

  • Fixed various bugs.

Credits

  • Vivin Paliath / author

Regula 1.1.1

03 Jul 21:35
Compare
Choose a tag to compare

Regula Version 1.1.1

Changes and New Features

  • Added validation groups. Constraints can now be assigned to validation groups and can be validated by groups as well. All constraints belong to the Default group by default.
  • Added @Blank and @NotBlank aliases for @Empty and @NotEmpty.
  • @Between is now an alias for @Range.
  • @Matches is now an alias for @Pattern.
  • regula.Group is now available to refer to defined groups. For example regula.Group.MyGroup is available after it has been defined.
  • Improved error messages and sanity checks.

Bug fixes

  • Fixed various minor bugs.

Credits

  • Vivin Paliath / author

Regula 1.0.1

03 Jul 21:27
Compare
Choose a tag to compare

Regula Version 1.0.1

Changes and New Features

  • Added @Required constraint.
  • Modified parameter names for @Max and @Min to be value instead of max and min.
  • Modified parameter names to @Pattern to be regexp instead of pattern. Also added a flags parameter.
  • Minor grammatical corrections to default failure-messages.
  • Added boolean type to constraint annotation.
  • Improved error messages.

Bug fixes

  • Fixed bugs in annotation parser.

Credits

  • Vivin Paliath / author