Skip to content

Commit

Permalink
Release 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobranco committed Oct 8, 2019
1 parent e8f1698 commit 1652c1c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/asserts/bank-identifier-code-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var _validator = require('validator.js');
* Bic regex.
*/

const bic = /^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/;
const bic = /^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$/i;

/**
* Export `BankIdentifierCodeAssert`.
Expand Down
2 changes: 1 addition & 1 deletion dist/asserts/phone-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function phoneAssert() {
}

if (this.countryCode && !phoneUtil.isValidNumberForRegion(phone, this.countryCode)) {
throw new Error(`Phone does not belong to country "${ this.countryCode }"`);
throw new Error(`Phone does not belong to country "${this.countryCode}"`);
}
} catch (e) {
throw new _validator.Violation(this, value);
Expand Down
4 changes: 2 additions & 2 deletions dist/asserts/uk-modulus-checking-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function ukModulusCheckingAssert() {
this.validate = function () {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

let accountNumber = _ref.accountNumber;
let sortCode = _ref.sortCode;
let accountNumber = _ref.accountNumber,
sortCode = _ref.sortCode;

if (typeof accountNumber !== 'string') {
throw new _validator.Violation(_this, accountNumber, { accountNumber: _validator.Validator.errorCode.must_be_a_string });
Expand Down
2 changes: 1 addition & 1 deletion dist/asserts/uri-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function uriAssert(constraints) {

(0, _lodash.forEach)(this.constraints, (constraint, key) => {
if (!(0, _lodash.has)(URI.prototype, key)) {
throw new Error(`Invalid constraint "${ key }=${ constraint }"`);
throw new Error(`Invalid constraint "${key}=${constraint}"`);
}
});

Expand Down
6 changes: 3 additions & 3 deletions dist/asserts/us-subdivision-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const keys = Object.keys(subdivisions);
*/

function usSubdivisionAssert() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$categories = _ref.categories;

var _ref$categories = _ref.categories;
let categories = _ref$categories === undefined ? keys : _ref$categories;
var _ref$alpha2Only = _ref.alpha2Only;
let alpha2Only = _ref$alpha2Only === undefined ? false : _ref$alpha2Only;
Expand All @@ -48,7 +48,7 @@ function usSubdivisionAssert() {
*/

if (categories && (0, _lodash.intersection)(keys, categories).length !== categories.length) {
throw new Error(`Unsupported categories "${ (0, _lodash.difference)(categories, keys) }" given`);
throw new Error(`Unsupported categories "${(0, _lodash.difference)(categories, keys)}" given`);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "validator.js-asserts",
"version": "3.1.0",
"version": "3.1.1",
"description": "A set of extra asserts for validator.js.",
"license": "MIT",
"contributors": [
Expand Down

0 comments on commit 1652c1c

Please sign in to comment.