Ruby version is 6.0.0 Rails version is 6.0.3.4 An error has occurred in the above environment.
The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option? (ArgumentError)
Apparently, "^" and "$" are causing an error because there is a security risk.
It was solved by changing it like ^ → \ A, $ → \ z according to the error statement!
After investigating, it seems that the above error appears in Rails 4.0 or later versions. Security is improving every day!
The reason why "^" and "
for that reason "/ A" → the beginning of the character string "/ Z] → end of character string If you change it to, it will be read for each character string, so it is okay to pass multiple lines, so please use "/ A" and "/ z"! It was an error that the instruction came out.
By the way, if you use the ": multiline => true" option, you can also use "^" and "$", so if you are supposed to pass multiple lines, the solution using this option may be better. ..