Skip to content

Releases: h2lsoft/validator

v2.0.0

Choose a tag to compare

@h2lsoft h2lsoft released this 23 Feb 09:35
aa20c83

Validator v2.0 - Major rewrite with bug fixes, new rules, i18n

New validation rules:

  • boolean(), password(), custom(), different(), reset()
  • dateBefore(), dateAfter(), time(), timezone()
  • ipV4(), ipV6(), json(), jsonArray(), jsonObject()
  • country(), language(), currency()
  • iban() (MOD-97 checksum), bic()
  • uuid(), macAddress(), cssColor()
  • csrfToken() with auto-regeneration on failure
  • toJson() with auto Content-Type header

Bug fixes :

  • notIn() $params not passed to addError()
  • date()/datetime() missing $message param
  • strlen → mb_strlen for multibyte support (alpha, alphaNumeric, length, minLength, maxLength, mask)
  • integer()/float() filter_var() === false for proper zero handling
  • date()/datetime() getLastErrors() returning false on PHP 8.2+
  • Constructor return $this removed
  • Double $error = false cleanup

Code quality:

  • All private → protected for extensibility
  • PHP 7.4+ typed properties, parameters and return types
  • PHPDoc on all methods
  • LATINS_CHARS: removed duplicates, added missing chars (ì, ò, õ, ã, œ, ý, ÿ)
  • VERSION bumped to 2.0

i18n:

  • Added locale files: es, pt, de, it (+ updated fr)
  • All 70+ messages translated in 6 locales

Other:

  • composer.json: require php >=7.4, ext-mbstring
  • README.md: complete rewrite with all rules documented

v1.2.2

Choose a tag to compare

@h2lsoft h2lsoft released this 06 Feb 12:13
afd1b66

Full Changelog: v1.2.1...v1.2.2

v1.2.1

Choose a tag to compare

@h2lsoft h2lsoft released this 30 Jun 12:19
775d435
  • update file control

v1.2.0

Choose a tag to compare

@h2lsoft h2lsoft released this 30 Jun 12:16
5d05824
  • add fileImageWidth
  • fileImageheight
  • update locales
  • minox bug fixed

v1.1.5

Choose a tag to compare

@h2lsoft h2lsoft released this 28 Jun 16:31
c59196b
  • improve error message in result()
  • minor bug fixed

v1.1.3

Choose a tag to compare

@h2lsoft h2lsoft released this 27 Jun 20:33
af22165
  • bug fixed
  • improve php 8 compatibilities

v1.1.2

Choose a tag to compare

@h2lsoft h2lsoft released this 05 May 00:54

bug fixed

v1.1.0

Choose a tag to compare

@h2lsoft h2lsoft released this 04 May 01:16
  • add sameAs
  • add requiredIf
  • add inputGet
  • add fileRequired
  • add fileExtension
  • add fileMaxSize
  • add fileMime
  • add fileImage
  • add fileIsUploaded
  • add fileImageBase64
  • improve examples

v1.0.0

Choose a tag to compare

@h2lsoft h2lsoft released this 03 May 21:56
update