New features:
Fixes and Enhancements:
isHSL
and isEmail
@tux-tnisURL
: Allow URLs to have only a username in the userinfo subcomponent @jbuchmann-coostoisISIN
: optimization @bmacnaughtonisIP
: improved pattern for IPv4 and IPv6 @ognjenjevremovic[A-z]
regex range on some validators @bmacnaughtonisMacAddress
: improve regexes and options @fedeciisSlug
and rtrim
@fedeciisIPRange
: add support for IPv6 @neilimeisEAN
: add support for EAN-14 @varsubham @tux-tnisStrongPassword
: add @
as a valid symbol @stingallemanisBtcAddress
: add base58 @ezkemboiisFQDN
: numeric domain names @tux-tnNew and Improved locales:
isIdentityCard
, isPassportNumber
:IR
@mhf-ir @fedeciar-LY
@asghaier76 @tux-tnMY
@stranger26 @tux-tnisMobilePhone
:zh-CN
@Akira0705lv-LV
@AntonLukicheven-GH
@ankorGHmz-MZ
@salmento @tux-tnvi-VN
@kyled7en-SG
@liliwei25de-CH
, fr-CH
, it-CH
@dinfektedes-CO
@ezkemboi @tux-tnar-OM
@dev-snapt-AO
@AdilsonFuxeisPostalCode
:KR
@greatSuminiisTaxID
:pt-BR
@mschunkeel-GR
@dspinellisisVAT
:IT
@fedeciNew features:
Fixes and Enhancements:
isISO8601
: add strictSeparator
@brostone51isFQDN
: make more strict @CristhianMotocheisFQDN
: allow_underscore
option @gibson042isEmail
: character blacklisting @rubiinisURL
: added require_port
option @yshanliisEmail
: respect ignore_max_length
option @evantahlerisDate
: add strictMode and prevent mixed delimiters @tux-tnisAlpha
: support ignore
option @mum-never-proudNew and Improved locales:
isAlpha
, isAlphanumeric
:id-ID
and docs update @bekicotth-TH
@ipiranhaafa-IR
@fakhripaz-AZ
@saidfaganisMobilePhone
:ar-MA
@artpumpkinde-LU
,it-SM
, sq-AL
and ga-IE
@firlusen-HN
@jehielmartinezar-LB
, es-PE
, ka-GE
@rubiines-DO
@devraseces-BO
@rubiines-AR
@csrgtpt-BR
@viniciushvsilvaisPostalCode
:CN
@httpsbaoIR
@masoudDaliriyanSG
, MY
@stranger26TH
@ipiranhaaBY
@rubiinDO
and HT
@yomedisPassportNumber
:BY
@zenbyRU
@dkochetkov— this release is dedicated to @dbnandaa 🧒
Fixes and chores:
isURL
@heanzyzabalaisBase32
and isBase64
to validate empty strings properly @AberDerBartisTaxId
@dspinellisvalidate_length
option for isURL
@tomgrossmanNew and Improved locales:
isMobilePhone
:az-AZ
@saidfaganuz-Uz
@icyice0217de-DE
@heanzyzabalaen-PH
@stinkymonkeyphes-ES
@rubiinbs-BA
@MladenZeljiczh-CN
@heathcliff-huisPostalCode
:AZ
@saidfaganES
@rubiinIL
@rubiinisAlpha
, isAlphanumeric
:fa-AF
, fa-IR
@stinkymonkeyphvi-VN
@rubiinisBAN
:EG
, SV
@heanzyzabalaisIdentityCard
:IT
@lorenzodb1isIMEI()
validator
(#1346)isDate()
validator
(#1270)isTaxID()
validator
(#1336)isLatLong()
(#1340)isJSON()
(#1328)contains()
(#1334)isCreditCard()
(#1177)isCurrency()
(#1306)isFQDN()
handling of certain special chars
(#1091)isSlug()
(#1338)isEthereumAddress()
validator
to validate Ethereum addresses
(#1117)isBtcAddress()
validator
to validate Bitcoin addresses
(#1163)isIBAN()
validator
to validate International Bank Account Numbers
(#1243)isEAN()
validator
to validate International Article Numbers
(#1244)isSemVer()
validator
to validate Semantic Version Numbers
(#1246)isPassportNumber()
validator
(#1250)isRgbColor()
validator
(#1141)isHSL()
validator
(#1159)isLocale()
validator
(#1072)isIP()
validator
(#1211)isMACAddress()
validator
(#1267)toFloat()
sanitizer
(#1227)isIP()
to accept scoped IPv6 addresses
(#1160)isOctal()
validator
(#1153)isSlug()
validator
(#1096)isBIC()
validator for bank identification codes
(#1071)isHash()
(#1062)isHexadecimal()
(#1147)isMACAddress()
(#1065)isLength()
(#1070)isBase32()
validator
(#1023)isEmail()
to validate display names according to RFC2822
(#1004)isEmail()
to check total email length
(#1007)toString()
util is no longer exported
(0277eb)isISO8601()
strict mode now works in the browser
(#932)isURL()
to reject email-like URLs
(#901)strict
option to isISO8601()
(#910)isJWT()
signature requirements
(#906)isIdentityCard()
(#846)isMagnetURI()
to validate magnet URIs
(#884)isJWT()
to validate JSON web tokens
(#885)isMobilePhone()
to match any locale's pattern by default
(#874)isEmpty()
(#880)isEmail()
(#845)no_symbols
option to isNumeric()
(#848)no_colons
option to isMACAddress()
(#849)isURL()
to reject protocol relative URLs unless a flag is set
(#860)isIPRange()
validator
(#842)isMobilePhone()
(#742)isPostalCode()
(#830)isISO31661Alpha3()
validator
(#809)isNumeric()
(#810)isRFC3339()
validator
(#816)isFQDN()
, isURL()
and isEmail()
(bb3e542)isCreditCard()
(#805)isFloat()
min/max/gt/lt filters when a locale with a comma decimal is used
(2b70821)isFloat
validator
(#752)normalizeEmail()
no longer validates the email address
(#725)isFloat()
and isDecimal()
(#721)isPort()
validator
(#733)isHash()
validator
(#711)isCurrency()
(#713)require('validator/lib/isIS8601')
calls
(#688)isLatLong()
and isPostalCode()
validator
(#684)unescape()
(#690)isMobilePhone()
with Node <= 6.x
(#681)isURL()
now requires the require_tld: false
option to validate localhost
(#675)isURL()
now rejects URLs that are protocol only
(#642)isMobilePhone()
would silently return false if the locale was invalid or unsupported
(#657)isISRC()
validator for ISRC
(#660)isEmail()
based on
RFC3696 errata
(#655)isDate()
lt
and gt
to isInt()
(#588)isFloat()
(#544)isISSN()
(#593)normalizeEmail()
(#594)isNull()
to isEmpty()
(#574)escape()
(#516)normalizeEmail()
(#583)isInt()
(#532)isURL()
(#564)file:///foo.txt
) in isURL()
(#563)isURL()
host whitelist and blacklist
(#562)isMD5()
validator
(#557)isDate()
(#566)trim()
and rtrim()
(#556)isMobilePhone()
(#540)isAlpha()
and isAlphanumeric()
(#541)isMobilePhone()
(#545)isCreditCard()
(#539)isMobilePhone()
(#538)isAlpha()
, isAlphanumeric()
and isMobilePhone()
(#537)allow_leading_zeroes
option to isInt()
(#532)isMobilePhone()
(#524)isDataURI()
validator
(#521)isURL()
when protocol was missing and "://" appeared in the query
(#518)unescape()
HTML function
(#509)isMobilePhone()
(#507)isAlpha()
and isAlphanumeric()
(#506)isAlpha()
, isAlphanumeric()
and isMobilePhone()
(#512)allow_underscores
(#510)extend()
function
(#496)isAlpha()
and isAlphanumeric()
(#496)isAlpha()
and isAlphanumeric()
(#499)isAlpha()
and isAlphanumeric()
(#492)isMobilePhone()
(#489)isMobilePhone()
, isAlpha()
and isAlphanumeric()
(#477)isMobilePhone()
(#455)Object.toString()
is [object Object]
not ""
(a57f3c8)isMobilePhone()
(#481)Object.create(null)
(#484)validator.isDate('2011-12-21')
(#480)isLength()
/ isByteLength()
accept {min, max}
as options object.
(#474)isDate()
when validating ISO 8601 dates without a timezone
(#472)isMACAddress()
validator
(#458)isWhitelisted()
validator
(#462)isMobilePhone()
(#452)isDate()
handling of RFC2822 timezones
(#447)isDate()
handling of ISO8601 timezones
(#444)isFloat('.') === true
(#443)isMobilePhone()
(#439)isMobilePhone()
(#432)isBefore()
where it would return null
(#436)isEmail()
regex
(#152)isDate()
(#418)isDecimal()
with an empty string
(#419)