active_storage_validations 2.0.4 → 3.0.1

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +125 -19
  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 +55 -46
  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/shared/asv_analyzable.rb +6 -0
  28. data/lib/active_storage_validations/shared/asv_attachable.rb +1 -1
  29. data/lib/active_storage_validations/size_validator.rb +1 -0
  30. data/lib/active_storage_validations/total_size_validator.rb +1 -0
  31. data/lib/active_storage_validations/version.rb +1 -1
  32. data/lib/active_storage_validations.rb +2 -0
  33. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 491e16f93da96fad8b6b28ea04082b86b94720b12ba6fe1dcfc78c7896276ae7
4
- data.tar.gz: fbb276c358504d03e6d6c46c02e9553e5e376141d070ee1fd155e5074cb43f8e
3
+ metadata.gz: 36bfc41c7b685fffb02f2fd8b19295777a0946d3725781baea5a8791adc72309
4
+ data.tar.gz: 35e2e50b228839fbb1d04110e4d1dfd85658d2ba1bc97f9a456be8ad03138f5f
5
5
  SHA512:
6
- metadata.gz: 8f29a4388357d60f8d834833bb687450fa890f42462d48dc8c664a01c088f72edf3bad8eb5e6ec497119049fde1f0dfb2cdddcd8a98b0ad24a327a4a9122cb0e
7
- data.tar.gz: 7ae4c7f58abb91ffec5f2bbfb6e02180667e8f47c5982137be1a2330d366c51f90eaa0a32b634a76e29b8e27d9821c07b2d4ef140fc6f40481f876d8b380f77f
6
+ metadata.gz: f60144f1f2ad43afdffab4ef13fb0e6bce21c605896e894243796652db4317fa2b87c1b58c80269c79e0ab248adea2f4bab1de352d1979564f390ed6611ae482
7
+ data.tar.gz: e7e074643ae0d9cbc08b7fd871f11435b1fafab170af7cae3f241e8380a9c1911db4815a8bcdd2c82616d86448473b32de39cbaf4b761dad69ba01e9617d7be1
data/README.md CHANGED
@@ -20,6 +20,8 @@ This gems is doing it right for you! Just use `validates :avatar, attached: true
20
20
  - [Error messages (I18n)](#error-messages-i18n)
21
21
  - [Using image metadata validators](#using-image-metadata-validators)
22
22
  - [Using video and audio metadata validators](#using-video-and-audio-metadata-validators)
23
+ - [Using pdf metadata validators](#using-pdf-metadata-validators)
24
+ - [Using content type spoofing protection validator option](#using-content-type-spoofing-protection-validator-option)
23
25
  - [Validators](#validators)
24
26
  - [Attached](#attached)
25
27
  - [Limit](#limit)
@@ -30,7 +32,9 @@ This gems is doing it right for you! Just use `validates :avatar, attached: true
30
32
  - [Duration](#duration)
31
33
  - [Aspect ratio](#aspect-ratio)
32
34
  - [Processable file](#processable-file)
35
+ - [Pages](#pages)
33
36
  - [Upgrading from 1.x to 2.x](#upgrading-from-1x-to-2x)
37
+ - [Upgrading from 2.x to 3.x](#upgrading-from-2x-to-3x)
34
38
  - [Internationalization (I18n)](#internationalization-i18n)
35
39
  - [Test matchers](#test-matchers)
36
40
  - [Contributing](#contributing)
@@ -72,12 +76,16 @@ Plus, you have to be sure to have the corresponding command-line tool installed
72
76
 
73
77
  To use the video and audio metadata validators (`dimension`, `aspect_ratio`, `processable_file` and `duration`), you will not need to add any gems. However you will need to have the `ffmpeg` command-line tool installed on your system (once again, be sure to have it installed both on your local and in your CI / production environments).
74
78
 
75
- If you want some inspiration about how to add `imagemagick`, `libvips` or `ffmpeg` to your docker image, you can check how we do it for the gem CI (https://github.com/igorkasyanchuk/active_storage_validations/blob/master/.github/workflows/main.yml)
79
+ ### Using pdf metadata validators
80
+
81
+ To use the pdf metadata validators (`dimension`, `aspect_ratio`, `processable_file` and `pages`), you will not need to add any gems. However you will need to have the `poppler` tool installed on your system (once again, be sure to have it installed both on your local and in your CI / production environments).
76
82
 
77
83
  ### Using content type spoofing protection validator option
78
84
 
79
85
  To use the `spoofing_protection` option with the `content_type` validator, you only need to have the UNIX `file` command on your system.
80
86
 
87
+ If you want some inspiration about how to add `imagemagick`, `libvips`, `ffmpeg` or `poppler` to your docker image, you can check how we do it for the gem CI (https://github.com/igorkasyanchuk/active_storage_validations/blob/master/.github/workflows/main.yml)
88
+
81
89
  ## Validators
82
90
 
83
91
  **List of validators:**
@@ -90,6 +98,7 @@ To use the `spoofing_protection` option with the `content_type` validator, you o
90
98
  - [Duration](#duration): validates video / audio duration
91
99
  - [Aspect ratio](#aspect-ratio): validates image / video aspect ratio
92
100
  - [Processable file](#processable-file): validates if a file can be processed
101
+ - [Pages](#pages): validates pdf number of pages
93
102
  <br>
94
103
  <br>
95
104
 
@@ -197,7 +206,7 @@ Validates if the attachment has an allowed content type.
197
206
  #### Options
198
207
 
199
208
  The `content_type` validator has 3 possible options:
200
- - `with`: defines the exact allowed content type (string, symbol or regex)
209
+ - `with`: defines the allowed content type (string, symbol or regex)
201
210
  - `in`: defines the allowed content types (array of strings or symbols)
202
211
  - `spoofing_protection`: enables content type spoofing protection (boolean, defaults to `false`)
203
212
 
@@ -323,6 +332,7 @@ The `size` validator has 5 possible options:
323
332
  - `greater_than`: defines the strict minimum allowed file size
324
333
  - `greater_than_or_equal_to`: defines the minimum allowed file size
325
334
  - `between`: defines the allowed file size range
335
+ - `equal_to`: defines the allowed file size
326
336
 
327
337
  #### Examples
328
338
 
@@ -336,6 +346,7 @@ class User < ApplicationRecord
336
346
  validates :avatar, size: { greater_than: 1.kilobyte } # restricts the file size to > 1KB
337
347
  validates :avatar, size: { greater_than_or_equal_to: 1.kilobyte } # restricts the file size to >= 1KB
338
348
  validates :avatar, size: { between: 1.kilobyte..2.megabytes } # restricts the file size to between 1KB and 2MB
349
+ validates :avatar, size: { equal_to: 1.megabyte } # restricts the file size to exactly 1MB
339
350
  end
340
351
  ```
341
352
 
@@ -355,11 +366,13 @@ en:
355
366
  file_size_not_greater_than: "file size must be greater than %{min} (current size is %{file_size})"
356
367
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min} (current size is %{file_size})"
357
368
  file_size_not_between: "file size must be between %{min} and %{max} (current size is %{file_size})"
369
+ file_size_not_equal_to: "file size must be equal to %{exact} (current size is %{file_size})"
358
370
  ```
359
371
 
360
372
  The `size` validator error messages expose 4 values that you can use:
361
373
  - `file_size` containing the current file size (e.g. `1.5MB`)
362
374
  - `min` containing the minimum allowed file size (e.g. `1KB`)
375
+ - `exact` containing the allowed file size (e.g. `1MB`)
363
376
  - `max` containing the maximum allowed file size (e.g. `2MB`)
364
377
  - `filename` containing the current file name
365
378
 
@@ -377,6 +390,7 @@ The `total_size` validator has 5 possible options:
377
390
  - `greater_than`: defines the strict minimum allowed total file size
378
391
  - `greater_than_or_equal_to`: defines the minimum allowed total file size
379
392
  - `between`: defines the allowed total file size range
393
+ - `equal_to`: defines the allowed total file size
380
394
 
381
395
  #### Examples
382
396
 
@@ -390,6 +404,7 @@ class User < ApplicationRecord
390
404
  validates :certificates, total_size: { greater_than: 1.kilobyte } # restricts the total size to > 1KB
391
405
  validates :certificates, total_size: { greater_than_or_equal_to: 1.kilobyte } # restricts the total size to >= 1KB
392
406
  validates :certificates, total_size: { between: 1.kilobyte..10.megabytes } # restricts the total size to between 1KB and 10MB
407
+ validates :certificates, total_size: { equal_to: 1.megabyte } # restricts the total file size to exactly 1MB
393
408
  end
394
409
  ```
395
410
 
@@ -404,11 +419,13 @@ en:
404
419
  total_file_size_not_greater_than: "total file size must be greater than %{min} (current size is %{total_file_size})"
405
420
  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})"
406
421
  total_file_size_not_between: "total file size must be between %{min} and %{max} (current size is %{total_file_size})"
422
+ total_file_size_not_equal_to: "total file size must be equal to %{exact} (current size is %{total_file_size})"
407
423
  ```
408
424
 
409
425
  The `total_size` validator error messages expose 4 values that you can use:
410
426
  - `total_file_size` containing the current total file size (e.g. `1.5MB`)
411
427
  - `min` containing the minimum allowed total file size (e.g. `1KB`)
428
+ - `exact` containing the allowed total file size (e.g. `1MB`)
412
429
  - `max` containing the maximum allowed total file size (e.g. `2MB`)
413
430
 
414
431
  ---
@@ -416,15 +433,17 @@ The `total_size` validator error messages expose 4 values that you can use:
416
433
  ### Dimension
417
434
 
418
435
  Validates the dimension of the attached image / video files.
436
+ It can also be used for pdf files, but it will only analyze the pdf first page, and will assume a DPI of 72.
437
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
419
438
 
420
439
  #### Options
421
440
 
422
441
  The `dimension` validator has several possible options:
423
- - `width`: defines the exact allowed width (integer)
442
+ - `width`: defines the allowed width (integer)
424
443
  - `min`: defines the minimum allowed width (integer)
425
444
  - `max`: defines the maximum allowed width (integer)
426
445
  - `in`: defines the allowed width range (range)
427
- - `height`: defines the exact allowed height (integer)
446
+ - `height`: defines the allowed height (integer)
428
447
  - `min`: defines the minimum allowed height (integer)
429
448
  - `max`: defines the maximum allowed height (integer)
430
449
  - `in`: defines the allowed height range (range)
@@ -480,6 +499,7 @@ The `dimension` validator error messages expose 6 values that you can use:
480
499
  ### Duration
481
500
 
482
501
  Validates the duration of the attached audio / video files.
502
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
483
503
 
484
504
  #### Options
485
505
 
@@ -489,19 +509,21 @@ The `duration` validator has 5 possible options:
489
509
  - `greater_than`: defines the strict minimum allowed file duration
490
510
  - `greater_than_or_equal_to`: defines the minimum allowed file duration
491
511
  - `between`: defines the allowed file duration range
512
+ - `equal_to`: defines the allowed duration
492
513
 
493
514
  #### Examples
494
515
 
495
516
  Use it like this:
496
517
  ```ruby
497
518
  class User < ApplicationRecord
498
- has_one_attached :avatar
499
-
500
- validates :avatar, duration: { less_than: 2.minutes } # restricts the file duration to < 2 minutes
501
- validates :avatar, duration: { less_than_or_equal_to: 2.minutes } # restricts the file duration to <= 2 minutes
502
- validates :avatar, duration: { greater_than: 1.second } # restricts the file duration to > 1 second
503
- validates :avatar, duration: { greater_than_or_equal_to: 1.second } # restricts the file duration to >= 1 second
504
- validates :avatar, duration: { between: 1.second..2.minutes } # restricts the file duration to between 1 second and 2 minutes
519
+ has_one_attached :intro_song
520
+
521
+ validates :intro_song, duration: { less_than: 2.minutes } # restricts the file duration to < 2 minutes
522
+ validates :intro_song, duration: { less_than_or_equal_to: 2.minutes } # restricts the file duration to <= 2 minutes
523
+ validates :intro_song, duration: { greater_than: 1.second } # restricts the file duration to > 1 second
524
+ validates :intro_song, duration: { greater_than_or_equal_to: 1.second } # restricts the file duration to >= 1 second
525
+ validates :intro_song, duration: { between: 1.second..2.minutes } # restricts the file duration to between 1 second and 2 minutes
526
+ validates :intro_song, duration: { equal_to: 1.minute } # restricts the duration to exactly 1 minute
505
527
  end
506
528
  ```
507
529
 
@@ -516,11 +538,13 @@ en:
516
538
  duration_not_greater_than: "duration must be greater than %{min} (current duration is %{duration})"
517
539
  duration_not_greater_than_or_equal_to: "duration must be greater than or equal to %{min} (current duration is %{duration})"
518
540
  duration_not_between: "duration must be between %{min} and %{max} (current duration is %{duration})"
541
+ duration_not_equal_to: "duration must be equal to %{exact} (current duration is %{duration})"
519
542
  ```
520
543
 
521
544
  The `duration` validator error messages expose 4 values that you can use:
522
545
  - `duration` containing the current duration size (e.g. `2 minutes`)
523
546
  - `min` containing the minimum allowed duration size (e.g. `1 second`)
547
+ - `exact` containing the allowed duration (e.g. `3 seconds`)
524
548
  - `max` containing the maximum allowed duration size (e.g. `2 minutes`)
525
549
  - `filename` containing the current file name
526
550
 
@@ -528,12 +552,14 @@ The `duration` validator error messages expose 4 values that you can use:
528
552
 
529
553
  ### Aspect ratio
530
554
 
531
- Validates the aspect ratio of the attached files.
555
+ Validates the aspect ratio of the attached image / video files.
556
+ It can also be used for pdf files, but it will only analyze the pdf first page.
557
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
532
558
 
533
559
  #### Options
534
560
 
535
561
  The `aspect_ratio` validator has several options:
536
- - `with`: defines the exact allowed aspect ratio (e.g. `:is_16/9`)
562
+ - `with`: defines the allowed aspect ratio (e.g. `:is_16/9`)
537
563
  - `in`: defines the allowed aspect ratios (e.g. `%i[square landscape]`)
538
564
 
539
565
  This validator can define aspect ratios in several ways:
@@ -580,7 +606,8 @@ The `aspect_ratio` validator error messages expose 4 values that you can use:
580
606
 
581
607
  ### Processable file
582
608
 
583
- Validates if the attached files can be processed by MiniMagick or Vips (image) or ffmpeg (video/audio).
609
+ Validates if the attached files can be processed by MiniMagick or Vips (image), ffmpeg (video/audio) or poppler (pdf).
610
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
584
611
 
585
612
  #### Options
586
613
 
@@ -611,6 +638,60 @@ The `processable_file` validator error messages expose 1 value that you can use:
611
638
 
612
639
  ---
613
640
 
641
+ ### Pages
642
+
643
+ Validates each attached pdf file number of pages.
644
+ (be sure to have the right dependencies installed as mentioned in [installation](#installation))
645
+
646
+ #### Options
647
+
648
+ The `pages` validator has 6 possible options:
649
+ - `less_than`: defines the strict maximum allowed number of pages
650
+ - `less_than_or_equal_to`: defines the maximum allowed number of pages
651
+ - `greater_than`: defines the strict minimum allowed number of pages
652
+ - `greater_than_or_equal_to`: defines the minimum allowed number of pages
653
+ - `between`: defines the allowed number of pages range
654
+ - `equal_to`: defines the allowed number of pages
655
+
656
+ #### Examples
657
+
658
+ Use it like this:
659
+ ```ruby
660
+ class User < ApplicationRecord
661
+ has_one_attached :contract
662
+
663
+ validates :contract, pages: { less_than: 2 } # restricts the number of pages to < 2
664
+ validates :contract, pages: { less_than_or_equal_to: 2 } # restricts the number of pages to <= 2
665
+ validates :contract, pages: { greater_than: 1 } # restricts the number of pages to > 1
666
+ validates :contract, pages: { greater_than_or_equal_to: 1 } # restricts the number of pages to >= 1
667
+ validates :contract, pages: { between: 1..2 } # restricts the number of pages to between 1 and 2
668
+ validates :contract, pages: { equal_to: 1 } # restricts the number of pages to exactly 1
669
+ end
670
+ ```
671
+
672
+ #### Error messages (I18n)
673
+
674
+ ```yml
675
+ en:
676
+ errors:
677
+ messages:
678
+ pages_not_less_than: "page count must be less than %{max} (current page count is %{pages})"
679
+ pages_not_less_than_or_equal_to: "page count must be less than or equal to %{max} (current page count is %{pages})"
680
+ pages_not_greater_than: "page count must be greater than %{min} (current page count is %{pages})"
681
+ pages_not_greater_than_or_equal_to: "page count must be greater than or equal to %{min} (current page count is %{pages})"
682
+ pages_not_between: "page count must be between %{min} and %{max} (current page count is %{pages})"
683
+ pages_not_equal_to: "page count must be equal to %{exact} (current page count is %{pages})"
684
+ ```
685
+
686
+ The `pages` validator error messages expose 5 values that you can use:
687
+ - `pages` containing the current file number of pages (e.g. `7`)
688
+ - `min` containing the minimum allowed number of pages (e.g. `1`)
689
+ - `exact` containing the allowed number of pages (e.g. `3`)
690
+ - `max` containing the maximum allowed number of pages (e.g. `5`)
691
+ - `filename` containing the current file name
692
+
693
+ ---
694
+
614
695
  ## Upgrading from 1.x to 2.x
615
696
 
616
697
  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!
@@ -657,6 +738,19 @@ But this major version bump also comes with some breaking changes. Below are the
657
738
  - The validator has been replaced by `processable_file` validator, be sure to replace `processable_image: true` to `processable_file: true`
658
739
  - The associated matcher has also been updated accordingly, be sure to replace `validate_processable_image_of` to `validate_processable_file_of`
659
740
 
741
+ ## Upgrading from 2.x to 3.x
742
+
743
+ Version 3 comes with the ability to support single page pdf `dimension` / `aspect_ratio` analysis, we had to make a breaking change:
744
+ - To analyze PDFs, you must install the `poppler` PDF processing dependency
745
+ - It's a Rails-supported PDF processing dependency (https://guides.rubyonrails.org/active_storage_overview.html#requirements)
746
+ - To install it, check their documentation at this [link](https://pdf2image.readthedocs.io/en/latest/installation.html).
747
+ - To check if it's installed, execute `pdftoppm -h`.
748
+ - 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)
749
+
750
+ We also added the `pages` validator to validate pdf number of pages, and the `equal_to` option to `duration`, `size` and `total_size` validators.
751
+
752
+ Note that, if you do not perform these metadata validations on pdfs, the gem will work the same as in version 2.
753
+
660
754
  ## Internationalization (I18n)
661
755
 
662
756
  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.
@@ -693,8 +787,8 @@ Matcher methods available:
693
787
  describe User do
694
788
  # aspect_ratio:
695
789
  # #allowing, #rejecting
696
- it { is_expected.to validate_aspect_ratio_of(:avatar).allowing(:square) }
697
- it { is_expected.to validate_aspect_ratio_of(:avatar).rejecting(:portrait) }
790
+ it { is_expected.to validate_aspect_ratio_of(:avatar).allowing(:square, :portrait) } # possible to use an Array or *splatted array
791
+ it { is_expected.to validate_aspect_ratio_of(:avatar).rejecting(:square, :landscape) } # possible to use an Array or *splatted array
698
792
 
699
793
  # attached
700
794
  it { is_expected.to validate_attached_of(:avatar) }
@@ -724,28 +818,40 @@ describe User do
724
818
  it { is_expected.to validate_dimensions_of(:avatar).height_between(100..300) }
725
819
 
726
820
  # size:
727
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
821
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
728
822
  it { is_expected.to validate_size_of(:avatar).less_than(50.kilobytes) }
729
823
  it { is_expected.to validate_size_of(:avatar).less_than_or_equal_to(50.kilobytes) }
730
824
  it { is_expected.to validate_size_of(:avatar).greater_than(1.kilobyte) }
731
825
  it { is_expected.to validate_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
732
826
  it { is_expected.to validate_size_of(:avatar).between(100..500.kilobytes) }
827
+ it { is_expected.to validate_size_of(:avatar).equal_to(5.megabytes) }
733
828
 
734
829
  # total_size:
735
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
830
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
736
831
  it { is_expected.to validate_total_size_of(:avatar).less_than(50.kilobytes) }
737
832
  it { is_expected.to validate_total_size_of(:avatar).less_than_or_equal_to(50.kilobytes) }
738
833
  it { is_expected.to validate_total_size_of(:avatar).greater_than(1.kilobyte) }
739
834
  it { is_expected.to validate_total_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
740
835
  it { is_expected.to validate_total_size_of(:avatar).between(100..500.kilobytes) }
836
+ it { is_expected.to validate_total_size_of(:avatar).equal_to(5.megabytes) }
741
837
 
742
838
  # duration:
743
- # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
839
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
744
840
  it { is_expected.to validate_duration_of(:introduction).less_than(50.seconds) }
745
841
  it { is_expected.to validate_duration_of(:introduction).less_than_or_equal_to(50.seconds) }
746
842
  it { is_expected.to validate_duration_of(:introduction).greater_than(1.minute) }
747
843
  it { is_expected.to validate_duration_of(:introduction).greater_than_or_equal_to(1.minute) }
748
844
  it { is_expected.to validate_duration_of(:introduction).between(100..500.seconds) }
845
+ it { is_expected.to validate_duration_of(:avatar).equal_to(5.minutes) }
846
+
847
+ # pages:
848
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between, #equal_to
849
+ it { is_expected.to validate_pages_of(:contract).less_than(50) }
850
+ it { is_expected.to validate_pages_of(:contract).less_than_or_equal_to(50) }
851
+ it { is_expected.to validate_pages_of(:contract).greater_than(5) }
852
+ it { is_expected.to validate_pages_of(:contract).greater_than_or_equal_to(5) }
853
+ it { is_expected.to validate_pages_of(:contract).between(100..500) }
854
+ it { is_expected.to validate_pages_of(:contract).equal_to(5) }
749
855
  end
750
856
  ```
751
857
  (Note that matcher methods are chainable)
@@ -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_equal_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_equal_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})"