_acs-templating__validate_email (private)
_acs-templating__validate_email
Defined in packages/acs-templating/tcl/test/data-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ set message "" # # Valid emails # # See: https://en.wikipedia.org/wiki/Email_address#Examples # set valid_mails { la@lala.la openacs@openacs.org whatever.is.this@my.mail.com discouraged@butvalid disposable.style.email.with+symbol@example.com other.email-with-hyphen@example.com fully-qualified-domain@example.com user.name+tag+sorting@example.com x@example.com example-indeed@strange-example.com test/test@test.com example@s.example john..doe@example.org mailhost!username@example.org user%example.com@example.org user-@example.org } foreach mail $valid_mails { aa_true "Is $mail valid?" [template::data::validate email mail message] } # # Invalid emails # set invalid_mails { @no.valid no.valid nope A@b@c@example.com {a"b(c)d,e:f;g<h>i[j\k]l@example.com} {just"not"right@example.com} {this is"not\allowed@example.com} {this\ still\"not\\allowed@example.com} i_like_underscore@but_its_not_allowed_in_this_part.example.com {QA[icon]CHOCOLATE[icon]@test.com} } foreach mail $invalid_mails { aa_false "Is $mail valid?" [template::data::validate email mail message] } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "validate_email (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle