active_storage_validations 2.0.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +122 -16
  3. data/config/locales/da.yml +9 -0
  4. data/config/locales/de.yml +9 -0
  5. data/config/locales/en-GB.yml +9 -0
  6. data/config/locales/en.yml +9 -0
  7. data/config/locales/es.yml +9 -0
  8. data/config/locales/fr.yml +9 -0
  9. data/config/locales/it.yml +9 -0
  10. data/config/locales/ja.yml +9 -0
  11. data/config/locales/nl.yml +9 -0
  12. data/config/locales/pl.yml +9 -0
  13. data/config/locales/pt-BR.yml +9 -0
  14. data/config/locales/ru.yml +9 -0
  15. data/config/locales/sv.yml +10 -1
  16. data/config/locales/tr.yml +9 -0
  17. data/config/locales/uk.yml +9 -0
  18. data/config/locales/vi.yml +9 -0
  19. data/config/locales/zh-CN.yml +9 -0
  20. data/lib/active_storage_validations/analyzer/pdf_analyzer.rb +89 -0
  21. data/lib/active_storage_validations/base_comparison_validator.rb +13 -1
  22. data/lib/active_storage_validations/duration_validator.rb +1 -0
  23. data/lib/active_storage_validations/matchers/base_comparison_validator_matcher.rb +11 -1
  24. data/lib/active_storage_validations/matchers/pages_validator_matcher.rb +39 -0
  25. data/lib/active_storage_validations/matchers.rb +1 -0
  26. data/lib/active_storage_validations/pages_validator.rb +61 -0
  27. data/lib/active_storage_validations/railtie.rb +6 -3
  28. data/lib/active_storage_validations/shared/asv_analyzable.rb +6 -0
  29. data/lib/active_storage_validations/shared/asv_attachable.rb +1 -1
  30. data/lib/active_storage_validations/shared/asv_errorable.rb +25 -1
  31. data/lib/active_storage_validations/size_validator.rb +1 -0
  32. data/lib/active_storage_validations/total_size_validator.rb +1 -0
  33. data/lib/active_storage_validations/version.rb +1 -1
  34. data/lib/active_storage_validations.rb +2 -0
  35. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ba7e03a6367634ed5ece53bda87d82c76b179c75e2c9b37e4055d8f47f9ab98
4
- data.tar.gz: 7225e4937cab59e3209d082d9650c1077342eae7dcae46ddee0c25a9a5e93e56
3
+ metadata.gz: 93e3cce4862a67b4676b924738a37a5e25ef31ad60ece364872aef2a0edc33c5
4
+ data.tar.gz: bc62d1d25eeadf3361fff156d0c8dbab86b703039c7fdefb1d1d7a0bb21f2dcb
5
5
  SHA512:
6
- metadata.gz: 9464b889ae0f8ab4167bcc612926e44c52d3541de6092fa0c82baf57a2f9edb4f541780145443966fa168c8f3f819456b000fac4a8770c1e923219a7394918da
7
- data.tar.gz: 4dea3b65668a16cac757d85f4e8d8f31e98c5089bbcf5747a5f192083fb12e2b57d611091eb2e2fb468aff27c590cdad1232566f24b75415784c7fe28434013f
6
+ metadata.gz: 2a3e38c9a90eca24b3a4c31b5910ba32fe042766a21e662dd7949e86304e5b07d405fbd319ce5142bad2029bf957bf6e65726d9966f1807e988fd50942102699
7
+ data.tar.gz: 19d3e96320dbcb34febf7546d62ad556a892520b274d9b335f9a9d18b18c0539297328d5ad18886907cf83837f61deb40c2c43f8c51d949b72a251eb44dbbb1b
data/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![RailsJazz](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/my_other.svg?raw=true)](https://www.railsjazz.com)
8
8
  [![https://www.patreon.com/igorkasyanchuk](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/patron.svg?raw=true)](https://www.patreon.com/igorkasyanchuk)
9
9
 
10
+ [!["Buy Me A Coffee"](https://github.com/igorkasyanchuk/get-smart/blob/main/docs/snapshot-bmc-button-small.png?raw=true)](https://buymeacoffee.com/igorkasyanchuk)
10
11
 
11
12
  Active Storage Validations is a gem that allows you to add validations for Active Storage attributes.
12
13
 
@@ -29,7 +30,9 @@ This gems is doing it right for you! Just use `validates :avatar, attached: true
29
30
  - [Duration](#duration)
30
31
  - [Aspect ratio](#aspect-ratio)
31
32
  - [Processable file](#processable-file)
33
+ - [Pages](#pages)
32
34
  - [Upgrading from 1.x to 2.x](#upgrading-from-1x-to-2x)
35
+ - [Upgrading from 2.x to 3.x](#upgrading-from-2x-to-3x)
33
36
  - [Internationalization (I18n)](#internationalization-i18n)
34
37
  - [Test matchers](#test-matchers)
35
38
  - [Contributing](#contributing)
@@ -89,6 +92,7 @@ To use the `spoofing_protection` option with the `content_type` validator, you o
89
92
  - [Duration](#duration): validates video / audio duration
90
93
  - [Aspect ratio](#aspect-ratio): validates image / video aspect ratio
91
94
  - [Processable file](#processable-file): validates if a file can be processed
95
+ - [Pages](#pages): validates pdf number of pages
92
96
  <br>
93
97
  <br>
94
98
 
@@ -196,7 +200,7 @@ Validates if the attachment has an allowed content type.
196
200
  #### Options
197
201
 
198
202
  The `content_type` validator has 3 possible options:
199
- - `with`: defines the exact allowed content type (string, symbol or regex)
203
+ - `with`: defines the allowed content type (string, symbol or regex)
200
204
  - `in`: defines the allowed content types (array of strings or symbols)
201
205
  - `spoofing_protection`: enables content type spoofing protection (boolean, defaults to `false`)
202
206
 
@@ -322,6 +326,7 @@ The `size` validator has 5 possible options:
322
326
  - `greater_than`: defines the strict minimum allowed file size
323
327
  - `greater_than_or_equal_to`: defines the minimum allowed file size
324
328
  - `between`: defines the allowed file size range
329
+ - `equal_to`: defines the allowed file size
325
330
 
326
331
  #### Examples
327
332
 
@@ -335,6 +340,7 @@ class User < ApplicationRecord
335
340
  validates :avatar, size: { greater_than: 1.kilobyte } # restricts the file size to > 1KB
336
341
  validates :avatar, size: { greater_than_or_equal_to: 1.kilobyte } # restricts the file size to >= 1KB
337
342
  validates :avatar, size: { between: 1.kilobyte..2.megabytes } # restricts the file size to between 1KB and 2MB
343
+ validates :avatar, size: { equal_to: 1.megabyte } # restricts the file size to exactly 1MB
338
344
  end
339
345
  ```
340
346
 
@@ -354,11 +360,13 @@ en:
354
360
  file_size_not_greater_than: "file size must be greater than %{min} (current size is %{file_size})"
355
361
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min} (current size is %{file_size})"
356
362
  file_size_not_between: "file size must be between %{min} and %{max} (current size is %{file_size})"
363
+ file_size_not_equal_to: "file size must be equal to %{exact} (current size is %{file_size})"
357
364
  ```
358
365
 
359
366
  The `size` validator error messages expose 4 values that you can use:
360
367
  - `file_size` containing the current file size (e.g. `1.5MB`)
361
368
  - `min` containing the minimum allowed file size (e.g. `1KB`)
369
+ - `exact` containing the allowed file size (e.g. `1MB`)
362
370
  - `max` containing the maximum allowed file size (e.g. `2MB`)
363
371
  - `filename` containing the current file name
364
372
 
@@ -376,6 +384,7 @@ The `total_size` validator has 5 possible options:
376
384
  - `greater_than`: defines the strict minimum allowed total file size
377
385
  - `greater_than_or_equal_to`: defines the minimum allowed total file size
378
386
  - `between`: defines the allowed total file size range
387
+ - `equal_to`: defines the allowed total file size
379
388
 
380
389
  #### Examples
381
390
 
@@ -389,6 +398,7 @@ class User < ApplicationRecord
389
398
  validates :certificates, total_size: { greater_than: 1.kilobyte } # restricts the total size to > 1KB
390
399
  validates :certificates, total_size: { greater_than_or_equal_to: 1.kilobyte } # restricts the total size to >= 1KB
391
400
  validates :certificates, total_size: { between: 1.kilobyte..10.megabytes } # restricts the total size to between 1KB and 10MB
401
+ validates :certificates, total_size: { equal_to: 1.megabyte } # restricts the total file size to exactly 1MB
392
402
  end
393
403
  ```
394
404
 
@@ -403,11 +413,13 @@ en:
403
413
  total_file_size_not_greater_than: "total file size must be greater than %{min} (current size is %{total_file_size})"
404
414
  total_file_size_not_greater_than_or_equal_to: "total file size must be greater than or equal to %{min} (current size is %{total_file_size})"
405
415
  total_file_size_not_between: "total file size must be between %{min} and %{max} (current size is %{total_file_size})"
416
+ total_file_size_not_equal_to: "total file size must be equal to %{exact} (current size is %{total_file_size})"
406
417
  ```
407
418
 
408
419
  The `total_size` validator error messages expose 4 values that you can use:
409
420
  - `total_file_size` containing the current total file size (e.g. `1.5MB`)
410
421
  - `min` containing the minimum allowed total file size (e.g. `1KB`)
422
+ - `exact` containing the allowed total file size (e.g. `1MB`)
411
423
  - `max` containing the maximum allowed total file size (e.g. `2MB`)
412
424
 
413
425
  ---
@@ -415,15 +427,17 @@ The `total_size` validator error messages expose 4 values that you can use:
415
427
  ### Dimension
416
428
 
417
429
  Validates the dimension of the attached image / video files.
430
+ It can also be used for pdf files, but it will only analyze the pdf first page, and will assume a DPI of 72.
431
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
418
432
 
419
433
  #### Options
420
434
 
421
435
  The `dimension` validator has several possible options:
422
- - `width`: defines the exact allowed width (integer)
436
+ - `width`: defines the allowed width (integer)
423
437
  - `min`: defines the minimum allowed width (integer)
424
438
  - `max`: defines the maximum allowed width (integer)
425
439
  - `in`: defines the allowed width range (range)
426
- - `height`: defines the exact allowed height (integer)
440
+ - `height`: defines the allowed height (integer)
427
441
  - `min`: defines the minimum allowed height (integer)
428
442
  - `max`: defines the maximum allowed height (integer)
429
443
  - `in`: defines the allowed height range (range)
@@ -479,6 +493,7 @@ The `dimension` validator error messages expose 6 values that you can use:
479
493
  ### Duration
480
494
 
481
495
  Validates the duration of the attached audio / video files.
496
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
482
497
 
483
498
  #### Options
484
499
 
@@ -488,19 +503,21 @@ The `duration` validator has 5 possible options:
488
503
  - `greater_than`: defines the strict minimum allowed file duration
489
504
  - `greater_than_or_equal_to`: defines the minimum allowed file duration
490
505
  - `between`: defines the allowed file duration range
506
+ - `equal_to`: defines the allowed duration
491
507
 
492
508
  #### Examples
493
509
 
494
510
  Use it like this:
495
511
  ```ruby
496
512
  class User < ApplicationRecord
497
- has_one_attached :avatar
498
-
499
- validates :avatar, duration: { less_than: 2.minutes } # restricts the file duration to < 2 minutes
500
- validates :avatar, duration: { less_than_or_equal_to: 2.minutes } # restricts the file duration to <= 2 minutes
501
- validates :avatar, duration: { greater_than: 1.second } # restricts the file duration to > 1 second
502
- validates :avatar, duration: { greater_than_or_equal_to: 1.second } # restricts the file duration to >= 1 second
503
- validates :avatar, duration: { between: 1.second..2.minutes } # restricts the file duration to between 1 second and 2 minutes
513
+ has_one_attached :intro_song
514
+
515
+ validates :intro_song, duration: { less_than: 2.minutes } # restricts the file duration to < 2 minutes
516
+ validates :intro_song, duration: { less_than_or_equal_to: 2.minutes } # restricts the file duration to <= 2 minutes
517
+ validates :intro_song, duration: { greater_than: 1.second } # restricts the file duration to > 1 second
518
+ validates :intro_song, duration: { greater_than_or_equal_to: 1.second } # restricts the file duration to >= 1 second
519
+ validates :intro_song, duration: { between: 1.second..2.minutes } # restricts the file duration to between 1 second and 2 minutes
520
+ validates :intro_song, duration: { equal_to: 1.minute } # restricts the duration to exactly 1 minute
504
521
  end
505
522
  ```
506
523
 
@@ -515,11 +532,13 @@ en:
515
532
  duration_not_greater_than: "duration must be greater than %{min} (current duration is %{duration})"
516
533
  duration_not_greater_than_or_equal_to: "duration must be greater than or equal to %{min} (current duration is %{duration})"
517
534
  duration_not_between: "duration must be between %{min} and %{max} (current duration is %{duration})"
535
+ duration_not_equal_to: "duration must be equal to %{exact} (current duration is %{duration})"
518
536
  ```
519
537
 
520
538
  The `duration` validator error messages expose 4 values that you can use:
521
539
  - `duration` containing the current duration size (e.g. `2 minutes`)
522
540
  - `min` containing the minimum allowed duration size (e.g. `1 second`)
541
+ - `exact` containing the allowed duration (e.g. `3 seconds`)
523
542
  - `max` containing the maximum allowed duration size (e.g. `2 minutes`)
524
543
  - `filename` containing the current file name
525
544
 
@@ -527,12 +546,14 @@ The `duration` validator error messages expose 4 values that you can use:
527
546
 
528
547
  ### Aspect ratio
529
548
 
530
- Validates the aspect ratio of the attached files.
549
+ Validates the aspect ratio of the attached image / video files.
550
+ It can also be used for pdf files, but it will only analyze the pdf first page.
551
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
531
552
 
532
553
  #### Options
533
554
 
534
555
  The `aspect_ratio` validator has several options:
535
- - `with`: defines the exact allowed aspect ratio (e.g. `:is_16/9`)
556
+ - `with`: defines the allowed aspect ratio (e.g. `:is_16/9`)
536
557
  - `in`: defines the allowed aspect ratios (e.g. `%i[square landscape]`)
537
558
 
538
559
  This validator can define aspect ratios in several ways:
@@ -579,7 +600,8 @@ The `aspect_ratio` validator error messages expose 4 values that you can use:
579
600
 
580
601
  ### Processable file
581
602
 
582
- Validates if the attached files can be processed by MiniMagick or Vips (image) or ffmpeg (video/audio).
603
+ Validates if the attached files can be processed by MiniMagick or Vips (image), ffmpeg (video/audio) or poppler (pdf).
604
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
583
605
 
584
606
  #### Options
585
607
 
@@ -610,6 +632,60 @@ The `processable_file` validator error messages expose 1 value that you can use:
610
632
 
611
633
  ---
612
634
 
635
+ ### Pages
636
+
637
+ Validates each attached pdf file number of pages.
638
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
639
+
640
+ #### Options
641
+
642
+ The `pages` validator has 6 possible options:
643
+ - `less_than`: defines the strict maximum allowed number of pages
644
+ - `less_than_or_equal_to`: defines the maximum allowed number of pages
645
+ - `greater_than`: defines the strict minimum allowed number of pages
646
+ - `greater_than_or_equal_to`: defines the minimum allowed number of pages
647
+ - `between`: defines the allowed number of pages range
648
+ - `equal_to`: defines the allowed number of pages
649
+
650
+ #### Examples
651
+
652
+ Use it like this:
653
+ ```ruby
654
+ class User < ApplicationRecord
655
+ has_one_attached :contract
656
+
657
+ validates :contract, pages: { less_than: 2 } # restricts the number of pages to < 2
658
+ validates :contract, pages: { less_than_or_equal_to: 2 } # restricts the number of pages to <= 2
659
+ validates :contract, pages: { greater_than: 1 } # restricts the number of pages to > 1
660
+ validates :contract, pages: { greater_than_or_equal_to: 1 } # restricts the number of pages to >= 1
661
+ validates :contract, pages: { between: 1..2 } # restricts the number of pages to between 1 and 2
662
+ validates :contract, pages: { equal_to: 1 } # restricts the number of pages to exactly 1
663
+ end
664
+ ```
665
+
666
+ #### Error messages (I18n)
667
+
668
+ ```yml
669
+ en:
670
+ errors:
671
+ messages:
672
+ pages_not_less_than: "page count must be less than %{max} (current page count is %{pages})"
673
+ pages_not_less_than_or_equal_to: "page count must be less than or equal to %{max} (current page count is %{pages})"
674
+ pages_not_greater_than: "page count must be greater than %{min} (current page count is %{pages})"
675
+ pages_not_greater_than_or_equal_to: "page count must be greater than or equal to %{min} (current page count is %{pages})"
676
+ pages_not_between: "page count must be between %{min} and %{max} (current page count is %{pages})"
677
+ pages_not_equal_to: "page count must be equal to %{exact} (current page count is %{pages})"
678
+ ```
679
+
680
+ The `pages` validator error messages expose 5 values that you can use:
681
+ - `pages` containing the current file number of pages (e.g. `7`)
682
+ - `min` containing the minimum allowed number of pages (e.g. `1`)
683
+ - `exact` containing the allowed number of pages (e.g. `3`)
684
+ - `max` containing the maximum allowed number of pages (e.g. `5`)
685
+ - `filename` containing the current file name
686
+
687
+ ---
688
+
613
689
  ## Upgrading from 1.x to 2.x
614
690
 
615
691
  If you are upgrading from 1.x to 2.x, you will be pleased to note that a lot of things have been added and improved!
@@ -656,6 +732,19 @@ But this major version bump also comes with some breaking changes. Below are the
656
732
  - The validator has been replaced by `processable_file` validator, be sure to replace `processable_image: true` to `processable_file: true`
657
733
  - The associated matcher has also been updated accordingly, be sure to replace `validate_processable_image_of` to `validate_processable_file_of`
658
734
 
735
+ ## Upgrading from 2.x to 3.x
736
+
737
+ Version 3 comes with the ability to support single page pdf dimension / aspect_ratio analysis, we had to make a breaking change:
738
+ - To analyze PDFs, you must install the `poppler` PDF processing dependency
739
+ - It's a Rails-supported PDF processing dependency (https://guides.rubyonrails.org/active_storage_overview.html#requirements)
740
+ - To install it, check their documentation at this [link](https://pdf2image.readthedocs.io/en/latest/installation.html).
741
+ - To check if it's installed, execute `pdftoppm -h`.
742
+ - To install this tool in your CI / production environments, you can check how we do it in our own CI (https://github.com/igorkasyanchuk/active_storage_validations/blob/master/.github/workflows/main.yml)
743
+
744
+ We also added the `pages` validator to validate pdf number of pages, and the `equal_to` option to `duration`, `size`and `total_size` validators.
745
+
746
+ Note that, if you do not perform these metadata validations on pdfs, the gem will work the same as in version 2.
747
+
659
748
  ## Internationalization (I18n)
660
749
 
661
750
  Active Storage Validations uses I18n for error messages. The error messages are automatically loaded in your Rails app if your language translations are present in the gem.
@@ -723,28 +812,40 @@ describe User do
723
812
  it { is_expected.to validate_dimensions_of(:avatar).height_between(100..300) }
724
813
 
725
814
  # size:
726
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
815
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
727
816
  it { is_expected.to validate_size_of(:avatar).less_than(50.kilobytes) }
728
817
  it { is_expected.to validate_size_of(:avatar).less_than_or_equal_to(50.kilobytes) }
729
818
  it { is_expected.to validate_size_of(:avatar).greater_than(1.kilobyte) }
730
819
  it { is_expected.to validate_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
731
820
  it { is_expected.to validate_size_of(:avatar).between(100..500.kilobytes) }
821
+ it { is_expected.to validate_size_of(:avatar).equal_to(5.megabytes) }
732
822
 
733
823
  # total_size:
734
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
824
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
735
825
  it { is_expected.to validate_total_size_of(:avatar).less_than(50.kilobytes) }
736
826
  it { is_expected.to validate_total_size_of(:avatar).less_than_or_equal_to(50.kilobytes) }
737
827
  it { is_expected.to validate_total_size_of(:avatar).greater_than(1.kilobyte) }
738
828
  it { is_expected.to validate_total_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
739
829
  it { is_expected.to validate_total_size_of(:avatar).between(100..500.kilobytes) }
830
+ it { is_expected.to validate_total_size_of(:avatar).equal_to(5.megabytes) }
740
831
 
741
832
  # duration:
742
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
833
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
743
834
  it { is_expected.to validate_duration_of(:introduction).less_than(50.seconds) }
744
835
  it { is_expected.to validate_duration_of(:introduction).less_than_or_equal_to(50.seconds) }
745
836
  it { is_expected.to validate_duration_of(:introduction).greater_than(1.minute) }
746
837
  it { is_expected.to validate_duration_of(:introduction).greater_than_or_equal_to(1.minute) }
747
838
  it { is_expected.to validate_duration_of(:introduction).between(100..500.seconds) }
839
+ it { is_expected.to validate_duration_of(:avatar).equal_to(5.minutes) }
840
+
841
+ # pages:
842
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
843
+ it { is_expected.to validate_pages_of(:contract).less_than(50) }
844
+ it { is_expected.to validate_pages_of(:contract).less_than_or_equal_to(50) }
845
+ it { is_expected.to validate_pages_of(:contract).greater_than(5) }
846
+ it { is_expected.to validate_pages_of(:contract).greater_than_or_equal_to(5) }
847
+ it { is_expected.to validate_pages_of(:contract).between(100..500) }
848
+ it { is_expected.to validate_pages_of(:contract).equal_to(5) }
748
849
  end
749
850
  ```
750
851
  (Note that matcher methods are chainable)
@@ -801,6 +902,7 @@ To run the gem tests, launch the following commands in the root folder of gem re
801
902
  * `BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test` to run for Rails 7.1
802
903
  * `BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test` to run for Rails 7.2
803
904
  * `BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle exec rake test` to run for Rails 8.0
905
+ * `BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test` to run for Rails main
804
906
 
805
907
  Snippet to run in console:
806
908
 
@@ -810,11 +912,13 @@ BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle
810
912
  BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle
811
913
  BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle
812
914
  BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle
915
+ BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle
813
916
  BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test
814
917
  BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test
815
918
  BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test
816
919
  BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test
817
920
  BUNDLE_GEMFILE=gemfiles/rails_8_0.gemfile bundle exec rake test
921
+ BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test
818
922
  ```
819
923
 
820
924
  Tips:
@@ -838,3 +942,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
838
942
 
839
943
  [<img src="https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/more_gems.png?raw=true"
840
944
  />](https://www.railsjazz.com/?utm_source=github&utm_medium=bottom&utm_campaign=active_storage_validations)
945
+
946
+ [!["Buy Me A Coffee"](https://github.com/igorkasyanchuk/get-smart/blob/main/docs/snapshot-bmc-button.png?raw=true)](https://buymeacoffee.com/igorkasyanchuk)
@@ -12,16 +12,19 @@ da:
12
12
  file_size_not_greater_than: "filstørrelsen skal være større end %{min} (den nuværende størrelse er %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "filstørrelsen skal være større end eller lig med %{min} (den nuværende størrelse er %{file_size})"
14
14
  file_size_not_between: "filstørrelsen skal være mellem %{min} og %{max} (den nuværende størrelse er %{file_size})"
15
+ file_size_not_equal_to: "filstørrelsen skal være lig med %{exact} (den nuværende størrelse er %{file_size})"
15
16
  total_file_size_not_less_than: "den samlede filstørrelse skal være mindre end %{max} (aktuel størrelse er %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "den samlede filstørrelse skal være mindre end eller lig med %{max} (aktuel størrelse er %{total_file_size})"
17
18
  total_file_size_not_greater_than: "den samlede filstørrelse skal være større end %{min} (aktuel størrelse er %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "den samlede filstørrelse skal være større end eller lig med %{min} (aktuel størrelse er %{total_file_size})"
19
20
  total_file_size_not_between: "den samlede filstørrelse skal være mellem %{min} og %{max} (aktuel størrelse er %{total_file_size})"
21
+ total_file_size_not_equal_to: "den samlede filstørrelse skal være lig med %{exact} (aktuel størrelse er %{total_file_size})"
20
22
  duration_not_less_than: "varighed skal være mindre end %{max} (nuværende varighed er %{duration})"
21
23
  duration_not_less_than_or_equal_to: "varighed skal være mindre end eller lig med %{max} (nuværende varighed er %{duration})"
22
24
  duration_not_greater_than: "varigheden skal være større end %{min} (den aktuelle varighed er %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "varigheden skal være større end eller lig med %{min} (den aktuelle varighed er %{duration})"
24
26
  duration_not_between: "varighed skal være mellem %{min} og %{max} (den aktuelle varighed er %{duration})"
27
+ duration_not_equal_to: "varighed skal være lig med %{exact} (den aktuelle varighed er %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "ingen filer vedhæftet (skal have mellem %{min} og %{max} filer)"
27
30
  one: "kun 1 fil vedhæftet (skal have mellem %{min} og %{max} filer)"
@@ -52,3 +55,9 @@ da:
52
55
  aspect_ratio_not_x_y: "skal være %{authorized_aspect_ratios} (nuværende fil er %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "har et ugyldigt aspektforhold (gyldige aspektforhold er %{authorized_aspect_ratios})"
54
57
  file_not_processable: "identificeres ikke som en gyldig mediefil"
58
+ pages_not_less_than: "sideantal skal være mindre end %{max} (aktuelt sideantal er %{pages})"
59
+ pages_not_less_than_or_equal_to: "sideantal skal være mindre end eller lig med %{max} (aktuelt sideantal er %{pages})"
60
+ pages_not_greater_than: "sideantal skal være større end %{min} (aktuelt sideantal er %{pages})"
61
+ pages_not_greater_than_or_equal_to: "sideantal skal være større end eller lig med %{min} (aktuelt sideantal er %{pages})"
62
+ pages_not_between: "sideantal skal være mellem %{min} og %{max} (aktuelt sideantal er %{pages})"
63
+ pages_not_equal_to: "sideantal skal være lig med %{exact} (aktuelt sideantal er %{pages})"
@@ -12,16 +12,19 @@ de:
12
12
  file_size_not_greater_than: "Dateigröße muss größer als %{min} sein (aktuelle Dateigröße ist %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "Dateigröße muss größer oder gleich %{min} sein (aktuelle Dateigröße ist %{file_size})"
14
14
  file_size_not_between: "Dateigröße muss zwischen %{min} und %{max} liegen (aktuelle Dateigröße ist %{file_size})"
15
+ file_size_not_equal_to: "Dateigröße muss gleich %{exact} sein (aktuelle Dateigröße ist %{file_size})"
15
16
  total_file_size_not_less_than: "Die gesamte Dateigröße muss kleiner als %{max} sein (aktuelle Dateigröße ist %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "Die gesamte Dateigröße muss kleiner oder gleich %{max} sein (aktuelle Dateigröße ist %{total_file_size})"
17
18
  total_file_size_not_greater_than: "Die gesamte Dateigröße muss größer als %{min} sein (aktuelle Dateigröße ist %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "Die gesamte Dateigröße muss größer oder gleich %{min} sein (aktuelle Dateigröße ist %{total_file_size})"
19
20
  total_file_size_not_between: "Die gesamte Dateigröße muss zwischen %{min} und %{max} liegen (aktuelle Dateigröße ist %{total_file_size})"
21
+ total_file_size_not_equal_to: "Die gesamte Dateigröße muss gleich %{exact} sein (aktuelle Dateigröße ist %{total_file_size})"
20
22
  duration_not_less_than: "Die Dauer muss kleiner als %{max} sein (die aktuelle Dauer beträgt %{duration})"
21
23
  duration_not_less_than_or_equal_to: "Die Dauer muss kleiner oder gleich %{max} sein (die aktuelle Dauer beträgt %{duration})"
22
24
  duration_not_greater_than: "Die Dauer muss größer als %{min} sein (die aktuelle Dauer beträgt %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "Die Dauer muss größer oder gleich %{min} sein (die aktuelle Dauer beträgt %{duration})"
24
26
  duration_not_between: "Die Dauer muss zwischen %{min} und %{max} liegen (die aktuelle Dauer beträgt %{duration})"
27
+ duration_not_equal_to: "Die Dauer muss gleich %{exact} sein (die aktuelle Dauer beträgt %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "Keine Dateien angehängt (müssen zwischen %{min} und %{max} Dateien haben)"
27
30
  one: "Nur 1 Datei ist angehängt (müssen zwischen %{min} und %{max} Dateien haben)"
@@ -52,3 +55,9 @@ de:
52
55
  aspect_ratio_not_x_y: "muss %{authorized_aspect_ratios} sein (aktuelle Datei ist %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "hat ein ungültiges Seitenverhältnis (gültige Seitenverhältnisse sind %{authorized_aspect_ratios})"
54
57
  file_not_processable: "wird nicht als gültige Mediendatei identifiziert"
58
+ pages_not_less_than: "Die Seitenanzahl muss kleiner als %{max} sein (die aktuelle Seitenanzahl beträgt %{pages})."
59
+ pages_not_less_than_or_equal_to: "Die Seitenanzahl muss kleiner oder gleich %{max} sein (die aktuelle Seitenanzahl beträgt %{pages})."
60
+ pages_not_greater_than: "Die Seitenanzahl muss größer als %{min} sein (die aktuelle Seitenanzahl beträgt %{pages})."
61
+ pages_not_greater_than_or_qual_to: "Die Seitenanzahl muss größer oder gleich %{min} sein (die aktuelle Seitenanzahl beträgt %{pages})."
62
+ pages_not_between: "Die Seitenanzahl muss zwischen %{min} und %{max} liegen (die aktuelle Seitenanzahl beträgt %{pages})."
63
+ pages_not_qual_to: "Die Seitenanzahl muss gleich %{exact} sein (die aktuelle Seitenanzahl beträgt %{pages})."
@@ -12,16 +12,19 @@ en-GB:
12
12
  file_size_not_greater_than: "file size must be greater than %{min} (current size is %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min} (current size is %{file_size})"
14
14
  file_size_not_between: "file size must be between %{min} and %{max} (current size is %{file_size})"
15
+ file_size_not_equal_to: "file size must be equal to %{exact} (current size is %{file_size})"
15
16
  total_file_size_not_less_than: "total file size must be less than %{max} (current size is %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "total file size must be less than or equal to %{max} (current size is %{total_file_size})"
17
18
  total_file_size_not_greater_than: "total file size must be greater than %{min} (current size is %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "total file size must be greater than or equal to %{min} (current size is %{total_file_size})"
19
20
  total_file_size_not_between: "total file size must be between %{min} and %{max} (current size is %{total_file_size})"
21
+ total_file_size_not_equal_to: "total file size must be equal to %{exact} (current size is %{total_file_size})"
20
22
  duration_not_less_than: "duration must be less than %{max} (current duration is %{duration})"
21
23
  duration_not_less_than_or_equal_to: "duration must be less than or equal to %{max} (current duration is %{duration})"
22
24
  duration_not_greater_than: "duration must be greater than %{min} (current duration is %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "duration must be greater than or equal to %{min} (current duration is %{duration})"
24
26
  duration_not_between: "duration must be between %{min} and %{max} (current duration is %{duration})"
27
+ duration_not_equal_to: "duration must be equal to %{exact} (current duration is %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "no files attached (must have between %{min} and %{max} files)"
27
30
  one: "only 1 file attached (must have between %{min} and %{max} files)"
@@ -52,3 +55,9 @@ en-GB:
52
55
  aspect_ratio_not_x_y: "must be %{authorized_aspect_ratios} (current file is %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "has an invalid aspect ratio (valid aspect ratios are %{authorized_aspect_ratios})"
54
57
  file_not_processable: "is not identified as a valid media file"
58
+ pages_not_less_than: "page count must be less than %{max} (current page count is %{pages})"
59
+ pages_not_less_than_or_equal_to: "page count must be less than or equal to %{max} (current page count is %{pages})"
60
+ pages_not_greater_than: "page count must be greater than %{min} (current page count is %{pages})"
61
+ pages_not_greater_than_or_equal_to: "page count must be greater than or equal to %{min} (current page count is %{pages})"
62
+ pages_not_between: "page count must be between %{min} and %{max} (current page count is %{pages})"
63
+ pages_not_equal_to: "page count must be equal to %{exact} (current page count is %{pages})"
@@ -12,16 +12,19 @@ en:
12
12
  file_size_not_greater_than: "file size must be greater than %{min} (current size is %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min} (current size is %{file_size})"
14
14
  file_size_not_between: "file size must be between %{min} and %{max} (current size is %{file_size})"
15
+ file_size_not_equal_to: "file size must be equal to %{exact} (current size is %{file_size})"
15
16
  total_file_size_not_less_than: "total file size must be less than %{max} (current size is %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "total file size must be less than or equal to %{max} (current size is %{total_file_size})"
17
18
  total_file_size_not_greater_than: "total file size must be greater than %{min} (current size is %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "total file size must be greater than or equal to %{min} (current size is %{total_file_size})"
19
20
  total_file_size_not_between: "total file size must be between %{min} and %{max} (current size is %{total_file_size})"
21
+ total_file_size_not_equal_to: "total file size must be equal to %{exact} (current size is %{total_file_size})"
20
22
  duration_not_less_than: "duration must be less than %{max} (current duration is %{duration})"
21
23
  duration_not_less_than_or_equal_to: "duration must be less than or equal to %{max} (current duration is %{duration})"
22
24
  duration_not_greater_than: "duration must be greater than %{min} (current duration is %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "duration must be greater than or equal to %{min} (current duration is %{duration})"
24
26
  duration_not_between: "duration must be between %{min} and %{max} (current duration is %{duration})"
27
+ duration_not_equal_to: "duration must be equal to %{exact} (current duration is %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "no files attached (must have between %{min} and %{max} files)"
27
30
  one: "only 1 file attached (must have between %{min} and %{max} files)"
@@ -52,3 +55,9 @@ en:
52
55
  aspect_ratio_not_x_y: "must be %{authorized_aspect_ratios} (current file is %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "has an invalid aspect ratio (valid aspect ratios are %{authorized_aspect_ratios})"
54
57
  file_not_processable: "is not identified as a valid media file"
58
+ pages_not_less_than: "page count must be less than %{max} (current page count is %{pages})"
59
+ pages_not_less_than_or_equal_to: "page count must be less than or equal to %{max} (current page count is %{pages})"
60
+ pages_not_greater_than: "page count must be greater than %{min} (current page count is %{pages})"
61
+ pages_not_greater_than_or_equal_to: "page count must be greater than or equal to %{min} (current page count is %{pages})"
62
+ pages_not_between: "page count must be between %{min} and %{max} (current page count is %{pages})"
63
+ pages_not_equal_to: "page count must be equal to %{exact} (current page count is %{pages})"
@@ -12,16 +12,19 @@ es:
12
12
  file_size_not_greater_than: "el tamaño del archivo debe ser mayor que %{min} (el tamaño actual es %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "el tamaño del archivo debe ser mayor o igual a %{min} (el tamaño actual es %{file_size})"
14
14
  file_size_not_between: "el tamaño del archivo debe estar entre %{min} y %{max} (el tamaño actual es %{file_size})"
15
+ file_size_not_equal_to: "el tamaño del archivo debe ser igual a %{exact} (el tamaño actual es %{file_size})"
15
16
  total_file_size_not_less_than: "el tamaño total del archivo debe ser inferior a %{max} (el tamaño actual es %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "el tamaño total del archivo debe ser menor o igual a %{max} (el tamaño actual es %{total_file_size})"
17
18
  total_file_size_not_greater_than: "el tamaño total del archivo debe ser mayor que %{min} (el tamaño actual es %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "el tamaño total del archivo debe ser mayor o igual a %{min} (el tamaño actual es %{total_file_size})"
19
20
  total_file_size_not_between: "el tamaño total del archivo debe estar entre %{min} y %{max} (el tamaño actual es %{total_file_size})"
21
+ total_file_size_not_equal_to: "el tamaño total del archivo debe ser igual a %{exact} (el tamaño actual es %{total_file_size})"
20
22
  duration_not_less_than: "la duración debe ser inferior a %{max} (la duración actual es %{duration})"
21
23
  duration_not_less_than_or_equal_to: "la duración debe ser menor o igual a %{max} (la duración actual es %{duration})"
22
24
  duration_not_greater_than: "la duración debe ser mayor que %{min} (la duración actual es %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "la duración debe ser mayor o igual a %{min} (la duración actual es %{duration})"
24
26
  duration_not_between: "la duración debe estar entre %{min} y %{max} (la duración actual es %{duration})"
27
+ duration_not_equal_to: "la duración debe ser igual a %{exact} (la duración actual es %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "no hay archivos adjuntos (debe tener entre %{min} y %{max} archivos)"
27
30
  one: "solo 1 archivo adjunto (debe tener entre %{min} y %{max} archivos)"
@@ -52,3 +55,9 @@ es:
52
55
  aspect_ratio_not_x_y: "debe ser %{authorized_aspect_ratios} (el archivo actual es %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "tiene una relación de aspecto inválida (las relaciones de aspecto válidas son %{authorized_aspect_ratios})"
54
57
  file_not_processable: "no se identifica como un archivo multimedia válido"
58
+ pages_not_less_than: "el número de páginas debe ser menor que %{max} (el número actual de páginas es %{pages})"
59
+ pages_not_less_than_or_equal_to: "el número de páginas debe ser menor o igual que %{max} (el número actual de páginas es %{pages})"
60
+ pages_not_greater_than: "el número de páginas debe ser mayor que %{min} (el número actual de páginas es %{pages})"
61
+ pages_not_greater_than_or_equal_to: "el número de páginas debe ser mayor o igual que %{min} (el número actual de páginas es %{pages})"
62
+ pages_not_between: "el número de páginas debe estar entre %{min} y %{max} (el número actual de páginas es %{pages})"
63
+ pages_not_equal_to: "el número de páginas debe ser igual a %{exact} (el número actual de páginas es %{pages})"
@@ -12,16 +12,19 @@ fr:
12
12
  file_size_not_greater_than: "la taille du fichier doit être supérieure à %{min} (la taille actuelle est %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "la taille du fichier doit être supérieure ou égale à %{min} (la taille actuelle est %{file_size})"
14
14
  file_size_not_between: "la taille du fichier doit être comprise entre %{min} et %{max} (la taille actuelle est %{file_size})"
15
+ file_size_not_equal_to: "la taille du fichier doit être égale à %{exact} (la taille actuelle est %{file_size})"
15
16
  total_file_size_not_less_than: "la taille totale des fichiers doit être inférieure à %{max} (la taille actuelle est %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "la taille totale des fichiers doit être inférieure ou égale à %{max} (la taille actuelle est %{total_file_size})"
17
18
  total_file_size_not_greater_than: "la taille totale des fichiers doit être supérieure à %{min} (la taille actuelle est %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "la taille totale des fichiers doit être supérieure ou égale à %{min} (la taille actuelle est %{total_file_size})"
19
20
  total_file_size_not_between: "la taille totale des fichiers doit être comprise entre %{min} et %{max} (la taille actuelle est %{total_file_size})"
21
+ total_file_size_not_equal_to: "la taille totale des fichiers doit être égale à %{exact} (la taille actuelle est %{total_file_size})"
20
22
  duration_not_less_than: "la durée doit être inférieure à %{max} (la durée actuelle est %{duration})"
21
23
  duration_not_less_than_or_equal_to: "la durée doit être inférieure ou égale à %{max} (la durée actuelle est %{duration})"
22
24
  duration_not_greater_than: "la durée doit être supérieure à %{min} (la durée actuelle est %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "la durée doit être supérieure ou égale à %{min} (la durée actuelle est %{duration})"
24
26
  duration_not_between: "la durée doit être comprise entre %{min} et %{max} (la durée actuelle est %{duration})"
27
+ duration_not_equal_to: "la durée doit être égale à %{exact} (la durée actuelle est %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "pas de fichiers joints (doit avoir entre %{min} et %{max} fichiers)"
27
30
  one: "seulement 1 fichier joint (doit avoir entre %{min} et %{max} fichiers)"
@@ -52,3 +55,9 @@ fr:
52
55
  aspect_ratio_not_x_y: "doit être %{authorized_aspect_ratios} (le fichier actuel est %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "a un rapport d'aspect invalide (les rapports d'aspect valides sont %{authorized_aspect_ratios})"
54
57
  file_not_processable: "n'est pas identifié comme un fichier média valide"
58
+ pages_not_less_than: "le nombre de pages doit être inférieur à %{max} (le nombre actuel est de %{pages})"
59
+ pages_not_less_than_or_equal_to: "le nombre de pages doit être inférieur ou égal à %{max} (le nombre actuel est de %{pages})"
60
+ pages_not_greater_than: "le nombre de pages doit être supérieur à %{min} (le nombre actuel est de %{pages})"
61
+ pages_not_greater_than_or_equal_to: "le nombre de pages doit être supérieur ou égal à %{min} (le nombre actuel est de %{pages})"
62
+ pages_not_between: "le nombre de pages doit être compris entre %{min} et %{max} (le nombre actuel est de %{pages})"
63
+ pages_not_equal_to: "le nombre de pages doit être égal à %{exact} (le nombre actuel est de %{pages})"
@@ -12,16 +12,19 @@ it:
12
12
  file_size_not_greater_than: "la dimensione del file deve essere maggiore di %{min} (la dimensione attuale è %{file_size})"
13
13
  file_size_not_greater_than_or_equal_to: "la dimensione del file deve essere maggiore o uguale a %{min} (la dimensione attuale è %{file_size})"
14
14
  file_size_not_between: "la dimensione del file deve essere compresa tra %{min} e %{max} (la dimensione attuale è %{file_size})"
15
+ file_size_not_equal_to: "la dimensione del file deve essere uguale a %{exact} (la dimensione attuale è %{file_size})"
15
16
  total_file_size_not_less_than: "la dimensione totale dei file deve essere inferiore a %{max} (la dimensione attuale è %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "la dimensione totale dei file deve essere minore o uguale a %{max} (la dimensione attuale è %{total_file_size})"
17
18
  total_file_size_not_greater_than: "la dimensione totale dei file deve essere maggiore di %{min} (la dimensione attuale è %{total_file_size})"
18
19
  total_file_size_not_greater_than_or_equal_to: "la dimensione totale dei file deve essere maggiore o uguale a %{min} (la dimensione attuale è %{total_file_size})"
19
20
  total_file_size_not_between: "la dimensione totale dei file deve essere compresa tra %{min} e %{max} (la dimensione attuale è %{total_file_size})"
21
+ total_file_size_not_equal_to: "la dimensione totale dei file deve essere uguale a %{exact} (la dimensione attuale è %{total_file_size})"
20
22
  duration_not_less_than: "la durata deve essere inferiore a %{max} (la durata corrente è %{duration})"
21
23
  duration_not_less_than_or_equal_to: "la durata deve essere inferiore o uguale a %{max} (la durata corrente è %{duration})"
22
24
  duration_not_greater_than: "la durata deve essere superiore a %{min} (la durata corrente è %{duration})"
23
25
  duration_not_greater_than_or_equal_to: "la durata deve essere maggiore o uguale a %{min} (la durata corrente è %{duration})"
24
26
  duration_not_between: "la durata deve essere compresa tra %{min} e %{max} (la durata corrente è %{duration})"
27
+ duration_not_equal_to: "la durata deve essere uguale a %{exact} (la durata corrente è %{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "nessun file allegato (deve avere tra %{min} e %{max} file)"
27
30
  one: "solo 1 file allegato (deve avere tra %{min} e %{max} file)"
@@ -52,3 +55,9 @@ it:
52
55
  aspect_ratio_not_x_y: "deve essere %{authorized_aspect_ratios} (il file corrente è %{width}x%{height}px)"
53
56
  aspect_ratio_invalid: "ha un formato non valido (i rapporti di aspetto validi sono %{authorized_aspect_ratios})"
54
57
  file_not_processable: "non è identificato come file multimediale valido"
58
+ pages_not_less_than: "il numero di pagine deve essere inferiore a %{max} (il numero di pagine corrente è %{pages})"
59
+ pages_not_less_than_or_equal_to: "il numero di pagine deve essere inferiore o uguale a %{max} (il numero di pagine corrente è %{pages})"
60
+ pages_not_greater_than: "il numero di pagine deve essere maggiore di %{min} (il numero di pagine corrente è %{pages})"
61
+ pages_not_greater_than_or_equal_to: "il numero di pagine deve essere maggiore o uguale a %{min} (il numero di pagine corrente è %{pages})"
62
+ pages_not_between: "il numero di pagine deve essere compreso tra %{min} e %{max} (il numero di pagine corrente è %{pages})"
63
+ pages_not_equal_to: "il numero di pagine deve essere uguale a %{exact} (il numero di pagine corrente è %{pages})"
@@ -12,16 +12,19 @@ ja:
12
12
  file_size_not_greater_than: "ファイル サイズは %{min} より大きい必要があります (現在のサイズは %{file_size} です)"
13
13
  file_size_not_greater_than_or_equal_to: "ファイル サイズは %{min} 以上である必要があります (現在のサイズは %{file_size})"
14
14
  file_size_not_between: "ファイル サイズは %{min} から %{max} の間でなければなりません (現在のサイズは %{file_size} です)"
15
+ file_size_not_equal_to: "ファイル サイズは %{exact} にする必要があります (現在のサイズは %{file_size})"
15
16
  total_file_size_not_less_than: "ファイルの合計サイズは %{max} 未満である必要があります (現在のサイズは %{total_file_size})"
16
17
  total_file_size_not_less_than_or_equal_to: "ファイルの合計サイズは %{max} 以下である必要があります (現在のサイズは %{total_file_size})"
17
18
  total_file_size_not_greater_than: "ファイルの合計サイズは %{min} より大きくなければなりません (現在のサイズは %{total_file_size} です)"
18
19
  total_file_size_not_greater_than_or_equal_to: "ファイルの合計サイズは %{min} 以上である必要があります (現在のサイズは %{total_file_size})"
19
20
  total_file_size_not_between: "ファイルの合計サイズは %{min} から %{max} までである必要があります (現在のサイズは %{total_file_size})"
21
+ total_file_size_not_equal_to: "ファイルの合計サイズは %{exact} にする必要があります (現在のサイズは %{total_file_size})"
20
22
  duration_not_less_than: "期間は%{max}未満である必要があります(現在の期間は%{duration})"
21
23
  duration_not_less_than_or_equal_to: "期間は%{max}以下でなければなりません(現在の期間は%{duration})"
22
24
  duration_not_greater_than: "期間は%{min}より大きくなければなりません(現在の期間は%{duration}です)"
23
25
  duration_not_greater_than_or_equal_to: "期間は%{min}以上である必要があります(現在の期間は%{duration})"
24
26
  duration_not_between: "期間は%{min}と%{max}の間でなければなりません(現在の期間は%{duration})"
27
+ duration_not_equal_to: "期間は%{exact}と等しい必要があります(現在の期間は%{duration})"
25
28
  limit_out_of_range:
26
29
  zero: "添付されたファイルはありません(%{min}と%{max}ファイルの間にある必要があります)"
27
30
  one: "1つのファイルのみが添付されています(%{min}と%{max}ファイルの間にある必要があります)"
@@ -52,3 +55,9 @@ ja:
52
55
  aspect_ratio_not_x_y: "は%{authorized_aspect_ratios}である必要があります(現在のファイルは%{width}x%{height})"
53
56
  aspect_ratio_invalid: "は無効なアスペクト比です(有効なアスペクト比は%{authorized_aspect_ratios}です)"
54
57
  file_not_processable: "は無効なメディアファイルです"
58
+ pages_not_less_than: "ページ数は %{max} 未満である必要があります (現在のページ数は %{pages} です)"
59
+ pages_not_less_than_or_equal_to: "ページ数は %{max} 以下である必要があります (現在のページ数は %{pages} です)"
60
+ pages_not_greater_than: "ページ数は %{min} より大きい必要があります (現在のページ数は %{pages} です)"
61
+ pages_not_greater_than_or_equal_to: "ページ数は %{min} 以上である必要があります (現在のページ数は %{pages} です)"
62
+ pages_not_between: "ページ数は %{min} から %{max} の間である必要があります (現在のページ数は %{pages} です)"
63
+ pages_not_equal_to: "ページ数は %{exact} と等しい必要があります (現在のページ数は%{pages})"