(快速參考)

matches

目的

驗證字串值是否符合指定的正規表示式。

範例

login matches: "[a-zA-Z]+"

說明

針對字串值套用正規表示式。

錯誤代碼:className.propertyName.matches.invalid