Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
波兰用户的问题。我有这样的名字验证:
:format => {:with => /\A[a-zA-Z]+\z/}
我怎样才能给这个添加润色 - ążźćńęółśż
如果您想验证名字是否包含非重音字母和来自该特定子集的字母,我认为最准确的方法是在正则表达式中明确声明子集。像这样的东西:
:format => { :with => /\A[ążźćńęółśża-zA-Z]\z/ }