Commit e8eef114e360e2d28dc30a3812f7c69847579c12

Authored by Yarik
1 parent 74463ccf

Video validation

Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
models/ProductVideo.php
@@ -49,6 +49,14 @@ @@ -49,6 +49,14 @@
49 'required', 49 'required',
50 ], 50 ],
51 [ 51 [
  52 + [
  53 + 'url',
  54 + ],
  55 + 'match',
  56 + 'pattern' => '/^.*<iframe.*https:\/\/.*$/',
  57 + 'message' => \Yii::t('app', 'Ссылка обязательно должна включать тег iframe и протокол должен быть https://'),
  58 + ],
  59 + [
52 [ 'product_id' ], 60 [ 'product_id' ],
53 'exist', 61 'exist',
54 'skipOnError' => true, 62 'skipOnError' => true,