TWSD-1354: If we enter wrong email id, then able to create an email alert on AVX.

Review Request #1299 — Created Jan. 9, 2026 and updated — Latest diff uploaded

ngurunathan
AVX2
TWSD-1353, TWSD-1354
bsrivalli, stevenku, wli

Previously, basic email validation was done validating whether email is non-null and "@" is present in email for destination email address. This is similar to validation done for target email address for log alerts in APV.
Added detailed email validation for target email address in this review. Also made some minor changes to avoid ambiguity between posix regex functions and regex functions ported for patricia_regex_tree from APV.

Currently, I haven't added condition to allow quoted local part in email as quoted local part allows space, \r\n , folding white space in emails. (eg: "John doe"@gmail.com, "abc@new"@gmail.com). As quoted local part is not accepted by real world mail servers and validating it will be difficult, havent included conditions for this. (https://www.suped.com/knowledge/email-deliverability/technical/what-special-characters-are-allowed-in-email-address-syntax-according-to-rfc-5322-and-how-do-dif) . If those conditions are needed, please let me know in review.

AN(config)#log alert 9 "CLI" ".john@example.com" 0
Email: Local part not in correct format
AN(config)#log alert 9 "CLI" "john.@example.com" 0
Email: Local part not in correct format
AN(config)#log alert 9 "CLI" "john@example..com" 0
Email: Domain part not in correct format
AN(config)#log alert 9 "CLI" "john@exam_ple.com" 0
Email: Domain part not in correct format

    Loading...