You are here

CropTypeAspectRatioValidationConstraint.php in Crop API 8.2

File

src/Plugin/Validation/Constraint/CropTypeAspectRatioValidationConstraint.php
View source
<?php

namespace Drupal\crop\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Supports validating crop type aspect ratio.
 *
 * @Constraint(
 *   id = "CropTypeAspectRatioValidation",
 *   label = @Translation("Crop Type aspect ratio", context = "Validation")
 * )
 */
class CropTypeAspectRatioValidationConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'Invalid aspect ratio format. Should be defined in H:W form.';

}

Classes

Namesort descending Description
CropTypeAspectRatioValidationConstraint Supports validating crop type aspect ratio.