コード例 #1
0
ファイル: Mobile.php プロジェクト: isign/isign-sdk-php
 /**
  * Validation constraints for request data validation
  * @return Assert\Collection
  */
 public function getValidationConstraints()
 {
     return new Assert\Collection(['type' => new Assert\Required([new Assert\NotBlank(), new Assert\Choice(['choices' => DocumentTypeProvider::getAllDocumentTypes()])]), 'phone' => new Assert\Required([new Assert\NotBlank(), new Phone()]), 'code' => new Assert\Required([new Assert\NotBlank(), new Code()]), $this->type => new Assert\Collection([]), 'language' => new Assert\Optional(), 'message' => new Assert\Optional(), 'timestamp' => new Assert\Optional()]);
 }
コード例 #2
0
ファイル: Check.php プロジェクト: isign/isign-sdk-php
 /**
  * Validation constraints for fields
  * @return array
  */
 public function getValidationConstraints()
 {
     return new Assert\Collection(['type' => new Assert\Required([new Assert\NotBlank(), new Assert\Choice(['choices' => DocumentTypeProvider::getPrimaryDocumentTypes()])]), 'file' => new Assert\Collection(['name' => new Assert\Required([new Assert\NotBlank()]), 'content' => new Assert\Required([new Assert\NotBlank()]), 'digest' => new Assert\Required([new Assert\NotBlank()])])]);
 }
コード例 #3
0
 public function testGetPrimaryDocumentTypes()
 {
     $this->assertEquals(3, count(DocumentTypeProvider::getPrimaryDocumentTypes()));
 }
コード例 #4
0
ファイル: ScPrepare.php プロジェクト: isign/isign-sdk-php
 /**
  * Validation constraints for fields
  * @return array
  */
 public function getValidationConstraints()
 {
     return new Assert\Collection(['certificate' => new Assert\Required([new Assert\NotBlank()]), 'type' => new Assert\Required([new Assert\NotBlank(), new Assert\Choice(['choices' => DocumentTypeProvider::getAllDocumentTypes()])]), 'timestamp' => new Assert\Required([new Assert\Type(['type' => 'bool'])]), 'language' => new Assert\Required([new Assert\Choice(['choices' => ['LT', 'EN']])]), $this->type => new Assert\Collection([])]);
 }