Instructor: 00:01 At the moment, our validation for emails is very simplistic. It just checks that the @ is there. If we want a more realistic Regex-based implementation, then we need to improve that. To do this, first we need to import the Regex module, and then let me change the implementation.
00:21 I create a regular expression. The Regex function converts a string to a regular expression, and I've just copied in a suitable string. Then we can make this case insensitive with the caseInsensitive function. Now, rather than string.contains, we can say regex.contains, using our Regex and given value.
00:52 I have a typo here. Now, let me check that it works as intended. If I just type @, this will have passed validation in the previous implementation, but now it fails. If I type a valid email, you can see this now passes validation.