コード例 #1
0
 public static function validateUndergradDegree(Entity\UndergradDegree $object, ExecutionContextInterface $context)
 {
     if (self::$runValidateUndergradDegree) {
         if ($object->isUk()) {
             $context->validate($object, '', 'CsrUKUndergradDegree', true);
         } else {
             $context->validate($object, '', 'CsrNonUKUndergradDegree', true);
         }
     }
 }
コード例 #2
0
ファイル: Job.php プロジェクト: BeerCoders/portfolio-api
 /**
  * @param ExecutionContextInterface $executionContext
  * @Assert\Callback()
  */
 public function _validateType(ExecutionContextInterface $executionContext)
 {
     $executionContext->validate($this, '', [$this->isCurrentJob() ? 'Default' : 'dateTo'], true);
 }