mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Merge pull request #1814 from beerline/master
feature: Add new validation from constraints.
This commit is contained in:
commit
a6f32712c8
@ -88,6 +88,11 @@ class SymfonyConstraintAnnotationReader
|
||||
$property->maximum = (int) $annotation->value;
|
||||
} elseif ($annotation instanceof Assert\LessThanOrEqual) {
|
||||
$property->maximum = (int) $annotation->value;
|
||||
} elseif ($annotation instanceof Assert\GreaterThan) {
|
||||
$property->exclusiveMinimum = true;
|
||||
$property->minimum = (int) $annotation->value;
|
||||
} elseif ($annotation instanceof Assert\GreaterThanOrEqual) {
|
||||
$property->minimum = (int) $annotation->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user