Refactor latin errors #2716

This commit is contained in:
Martin Lensment 2015-07-16 11:35:14 +03:00
parent 2a1e8a325d
commit 968f5d180d
2 changed files with 12 additions and 2 deletions

View file

@ -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