我有一个razor
应用程序,我想在视图中添加电子邮件验证
<td><input type="text" name="mail" placeholder="me@example.com" required autofocus title="" pattern="/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/"/> </td>
但在这里我得到了这个语法错误
"[" Is not valid at the start of a block of code. Only identifiers, keywords, comments, "(" and "{" are valid.
问题是什么?我该如何解决?