You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromguardrails.hubimportDetectPIIpii_guard=DetectPII(
pii_entities=["PHONE_NUMBER"],
on_fail="fix"
)
long_phone_number="555 867 5309"long_result=pii_guard.validate(long_phone_number, {})
# This correctly failsassertlong_result.outcome=="fail"short_phone_number="867 5309"short_result=pii_guard.validate(short_phone_number, {})
# This should fail but it doesn't!assertshort_result.outcome=="fail", f"Expected short_result.outcome to be \"fail\" but it was \"{short_result.outcome}\" instead!"
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: