I m试图利用管理机构对火灾储存规则进行电子邮件。
return request.resource.data.email.matches( /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i );
I pulled the regex directly from the Firebase documentation. https://firebase.google.com/docs/reference/security/database/regex
问题与我的电子邮件不相称。 我把它放入一个reg子检查器,似乎像<条码>/条码”那样。 它赢得了我的电子邮件,但如果我尝试,
(这将在监管机构工作),那么火店规则就会犯错误。
firestore.rules:47:83 - ERROR Missing match keyword before path.
! firestore.rules:47:83 - ERROR Unexpected /. .
! firestore.rules:47:85 - ERROR mismatched input [ expecting { { , / , PATH_SEGMENT}
! firestore.rules:47:95 - ERROR Unexpected $ .
! firestore.rules:47:96 - ERROR Missing match keyword before path.
! firestore.rules:47:99 - ERROR mismatched input ) expecting { { , / , PATH_SEGMENT}
! firestore.rules:81:5 - ERROR Unexpected allow .
! firestore.rules:87:3 - ERROR Unexpected } .
For reference the email I m testing against is
email: "[email protected]"