interactor-validation 0.3.6 → 0.3.7
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.
- checksums.yaml +4 -4
- data/lib/interactor/validation/validates.rb +8 -10
- data/lib/interactor/validation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d6d255c1cdb4048fbd485a9bc8b95096d521e592e6babe4ea7961ec429312386
|
|
4
|
+
data.tar.gz: a9bc28cb3c10f5f2415da43c3a63b8c774436e13d27e2e6facaaa0cbcbeb19b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5e73c0e35a659668dd31783d5fbea0869f54efe3db2d1033320c66d90fe9fb7997a2fc7079b602608ac6aa1bec60467588ba4b6fdea6bdd3b890cd24ea55bf5
|
|
7
|
+
data.tar.gz: 7da53549b4bd1ef65065b9480dca243f1a78922045f096281025f7e35a034c8418ce88c90cac698fd6dd8816a9c434e23050b88a42701d96803e2bcf73d8f78a
|
|
@@ -493,16 +493,15 @@ module Interactor
|
|
|
493
493
|
if current_config.error_mode == :code
|
|
494
494
|
# Code mode: use custom message or generate code
|
|
495
495
|
code_message = custom_message || error_code_for(error_type, **interpolations)
|
|
496
|
-
errors.add(attribute_path, code_message)
|
|
496
|
+
errors.add(attribute_path, code_message, halt: halt)
|
|
497
497
|
elsif custom_message
|
|
498
498
|
# Default mode: use ActiveModel's error messages with custom message
|
|
499
|
-
errors.add(attribute_path, custom_message)
|
|
499
|
+
errors.add(attribute_path, custom_message, halt: halt)
|
|
500
500
|
else
|
|
501
|
-
errors.add(attribute_path, error_type, **interpolations)
|
|
501
|
+
errors.add(attribute_path, error_type, halt: halt, **interpolations)
|
|
502
502
|
end
|
|
503
503
|
|
|
504
|
-
#
|
|
505
|
-
@halt_validation = true if halt
|
|
504
|
+
# Note: halt flag is set by ErrorsWrapper.add() if halt: true
|
|
506
505
|
end
|
|
507
506
|
# rubocop:enable Metrics/ParameterLists
|
|
508
507
|
|
|
@@ -701,16 +700,15 @@ module Interactor
|
|
|
701
700
|
if current_config.error_mode == :code
|
|
702
701
|
# Code mode: use custom message or generate code
|
|
703
702
|
code_message = custom_message || error_code_for(error_type, **interpolations)
|
|
704
|
-
errors.add(param_name, code_message)
|
|
703
|
+
errors.add(param_name, code_message, halt: halt)
|
|
705
704
|
elsif custom_message
|
|
706
705
|
# Default mode: use ActiveModel's error messages
|
|
707
|
-
errors.add(param_name, custom_message)
|
|
706
|
+
errors.add(param_name, custom_message, halt: halt)
|
|
708
707
|
else
|
|
709
|
-
errors.add(param_name, error_type, **interpolations)
|
|
708
|
+
errors.add(param_name, error_type, halt: halt, **interpolations)
|
|
710
709
|
end
|
|
711
710
|
|
|
712
|
-
#
|
|
713
|
-
@halt_validation = true if halt
|
|
711
|
+
# Note: halt flag is set by ErrorsWrapper.add() if halt: true
|
|
714
712
|
end
|
|
715
713
|
|
|
716
714
|
# Generate error code for :code mode using constants
|