metadata_presenter 3.4.11 → 3.4.12
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/app/validators/email_confirmation_validator.rb +1 -1
- data/app/validators/metadata_presenter/email_validator.rb +1 -1
- data/app/validators/saved_progress_validator.rb +1 -1
- data/config/initializers/email_regex.rb +5 -0
- data/lib/metadata_presenter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83d17506814ef299544b0a0337e1e4dcf8d063d73a914b13d2b3ee9965e27e2f
|
|
4
|
+
data.tar.gz: '099e925d82a72dbb7468d9a8d1e0cc7bd200caf89125cd0612ee8e85c7ffa813'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f4b219c02963eb2ebcc987ec7f94ca60a8e01c8200457385acc6c38ca22c3c3c500d604fecd28b80c2f4f00ece6c26cc44fbac2c549c4d9b83972f7e7f15992
|
|
7
|
+
data.tar.gz: '099df819f6cf6ec077b6b52a17e5148bf9bb0f871c5dd1ebcc87a7dda86c0f7c5ebf232e270128d4ca9fb905984899cbf62a68e9b4d9e280eb2228f9051cb2cf'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class EmailConfirmationValidator < ActiveModel::Validator
|
|
2
2
|
def validate(record)
|
|
3
|
-
regex =
|
|
3
|
+
regex = EMAIL_REGEXP
|
|
4
4
|
if record.email_confirmation.match(regex).nil?
|
|
5
5
|
record.errors.add(:email_confirmation, I18n.t('presenter.save_and_return.validation.email'))
|
|
6
6
|
end
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# /.rbenv/versions/3.2.0/lib/ruby/3.2.0/uri/mailto.rb
|
|
2
|
+
# EMAIL_REGEXP = /\A[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/
|
|
3
|
+
# Replaced with custom regex to better match requirements across the application,
|
|
4
|
+
# invalidating single-label domains (name@5)
|
|
5
|
+
EMAIL_REGEXP = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metadata_presenter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.4.
|
|
4
|
+
version: 3.4.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MoJ Forms
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_design_system_formbuilder
|
|
@@ -470,6 +470,7 @@ files:
|
|
|
470
470
|
- app/views/metadata_presenter/shared/_start_again_button.html.erb
|
|
471
471
|
- config/initializers/default_metadata.rb
|
|
472
472
|
- config/initializers/default_text.rb
|
|
473
|
+
- config/initializers/email_regex.rb
|
|
473
474
|
- config/initializers/inflections.rb
|
|
474
475
|
- config/initializers/schemas.rb
|
|
475
476
|
- config/initializers/supported_analytics.rb
|