I believe tweaking the regexp just a little bit is easier, like this:
/^(|[a-zA-Z ]+)$/ or /^([a-zA-Z ]*)$/
Judging by a quick test done in irb both seem to work just fine.
Hope it helps!
I believe tweaking the regexp just a little bit is easier, like this:
/^(|[a-zA-Z ]+)$/ or /^([a-zA-Z ]*)$/
Judging by a quick test done in irb both seem to work just fine.
Hope it helps!