cbValidation
v2.x
v2.x
  • Introduction
  • Intro
    • Release History
      • What's New With 2.1.0
      • What's New With 2.0.0
    • About This Book
      • Author
  • Overview
    • Installation
    • Configuration
    • Declaring Constraints
      • Configuration File
      • Domain Object
      • A-la-carte
    • Available Constraints
      • Custom Message Replacements
      • Constraint Custom Messages
    • Validating Constraints
      • Validating With Failures
      • Validating with shared constraints
      • Validating with a-la-carte constraints
      • Validating Custom Fields
      • Validating With Profiles
    • Displaying Errors
    • WireBox Integration
  • Advanced
    • Custom Validators
    • Unique ORM Validator
    • i18n Integration
    • Custom Validation Managers
Powered by GitBook
On this page
  • Features
  • Improvements
  • Compat & Bugs

Was this helpful?

Edit on Git
Export as PDF
  1. Intro
  2. Release History

What's New With 2.0.0

Features

  • No more manual discovery of validators, automated registration and lookup process, cleaned lots of code on this one!

  • New Validator: Accepted - The field under validation must be yes, on, 1, or true. This is useful for validating "Terms of Service" acceptance.

  • New Validator: Alpha - Only allows alphabetic characters

  • New Validator: RequiredUnless with validation data as a struct literal { anotherField:value, ... } - The field under validation must be present and not empty unless the anotherfield field is equal to the passed value.

  • New Validator: RequiredIf with validation data as a struct literal { anotherField:value, ... } - The field under validation must be present and not empty if the anotherfield field is equal to the passed value.

  • Accelerated validation by removing type checks. ACF chokes on interface checks

Improvements

  • Consistency on all validators to ignore null or empty values except the Required validator

  • Formatting consistencies

  • Improve error messages to describe better validation

  • Get away from evaluate() instead use invoke()

Compat & Bugs

  • Bugs : Fixed lots of wrong type exceptions

  • Compat : Remove ACF11 support

PreviousWhat's New With 2.1.0NextAbout This Book

Last updated 5 years ago

Was this helpful?