尊重验证 - 使用不是&

时间:2018-05-30 06:45:23

标签: respect-validation

用户输入他/她的公司名称。除特殊字符外,每个都允许。我不想列入白名单,而是希望将黑名单列为黑名单。这是我的一段代码

'nameofbusiness' => v::not (
                            v::oneOf ( 
                                                v::contains( '~'), v::contains ( '+' ), 
                                                v::contains( '-' ),v::contains ( '!' ), 
                                                v::contains( '@' ),v::contains ( '$' ), 
                                                v::contains ( '%' ), v::contains ( '^' ), 
                                                v::contains ( '&' ), v::contains ( '*' ), 
                                                v::contains ( '(' ), v::contains ( ')' ), 
                                                v::contains ( '[' ), v::contains ( ']' ), 
                                                v::contains ( '=' ), v::contains ( '_' ), 
                                                v::contains ( '/' ), v::contains ( '?' ), 
                                                v::contains ( '>' ), v::contains ( '<' ), 
                                                v::contains ( '.' ), v::contains ( ',' ), 
                                                v::contains ( ':' ), v::contains ( ';' ), 
                                                v::contains ( '"' ) 
                                       )
                            )

+(加号)#(哈希)和&amp;(&符号)正在滑过这些门。我怎样才能确保他们不这样做?非常感谢任何帮助。

0 个答案:

没有答案