File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1208,6 +1208,13 @@ Returns `true` if the string passed to this function is a syntactically correct
1208
1208
1209
1209
*Type*: rvalue.
1210
1210
1211
+ #### `is_email_address`
1212
+
1213
+ Returns true if the string passed to this function is a valid email address.
1214
+
1215
+ *Type*: rvalue.
1216
+
1217
+
1211
1218
#### `is_float`
1212
1219
1213
1220
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**
@@ -2029,6 +2036,27 @@ validate_domain_name('www.example.2com')
2029
2036
2030
2037
* Type* : statement.
2031
2038
2039
+ # ### `validate_email_address`
2040
+
2041
+ Validate that all values passed are valid email addresses. Fail compilation if any value fails this check.
2042
+
2043
+ The following values will pass:
2044
+
2045
+ ~ ~~
2046
+
2047
+ validate_email_address($my_email )
2048
+ validate_email_address(" [email protected] " , " [email protected] " , $my_email )
2049
+ ~ ~~
2050
+
2051
+ The following values will fail, causing compilation to abort:
2052
+
2053
+ ~ ~~
2054
+ $some_array = [ ' bad_email@/d/efdf.com' ]
2055
+ validate_email_address($some_array )
2056
+ ~ ~~
2057
+
2058
+ * Type* : statement.
2059
+
2032
2060
# ### `validate_hash`
2033
2061
2034
2062
** Deprecated. Will be removed in a future version of stdlib. See [` validate_legacy` ](# validate_legacy).**
You can’t perform that action at this time.
0 commit comments