mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Refactor latin errors #2716
This commit is contained in:
parent
2a1e8a325d
commit
968f5d180d
2 changed files with 12 additions and 2 deletions
|
@ -125,8 +125,13 @@ class EppController < ApplicationController
|
|||
def latin_only
|
||||
return true if params['frame'].blank?
|
||||
return true if params['frame'].match(/\A[\p{Latin}\p{Z}\p{P}\p{S}\p{Cc}\p{Cf}\w_\'\+\-\.\(\)\/]*\Z/i)
|
||||
render_epp_response '/epp/latin_error'
|
||||
false
|
||||
|
||||
epp_errors << {
|
||||
msg: 'Parameter value policy error. Allowed only Latin characters.',
|
||||
code: '2306'
|
||||
}
|
||||
|
||||
handle_errors and return false
|
||||
end
|
||||
|
||||
# VALIDATION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue