We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97996a2 commit a594ce0Copy full SHA for a594ce0
src/directives/schema-validate.directive.spec.js
@@ -41,7 +41,7 @@ describe('schema-validate.directive.js', function() {
41
tv4.defineError('EMAIL', 10001, 'Invalid email address');
42
tv4.defineKeyword('email', function(data, value, schema) {
43
if (schema.email) {
44
- if (/^\S+@\S+$/.test(data)) {
+ if (/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/.test(data)) {
45
return null;
46
}
47
return {
0 commit comments