[Symfony2.8] 驗證傳入參數 not blank

[Symfony2.8] 驗證傳入參數 not blank

  • 驗證傳入參數不等於空字串、空陣列、null、false
  • Validates that a value is not blank - meaning not equal to a blank string, a blank array, null or false
  • if (false === $value || (empty($value) && '0' != $value)) {
        // validation will fail
    }