@@ -40,6 +40,7 @@ import {
4040 ipv6Cidr ,
4141 macAddress ,
4242 nineDigitsCode ,
43+ organizationAlias ,
4344 password ,
4445 pathSegment ,
4546 phone ,
@@ -51,6 +52,7 @@ import {
5152 uppercaseBasicDomain ,
5253 uppercaseBasicSubdomain ,
5354 url ,
55+ uuid ,
5456} from '..'
5557
5658const alphanumDashDotsText = 'testwithdashdots-.'
@@ -104,6 +106,7 @@ const linuxPaths = {
104106 ] ,
105107 GOOD : [ '/var' , '/var/test' , '/var/test_' , '/var_/test' , '/' ] ,
106108}
109+ const uuidTest = '550e8400-e29b-41d4-a716-446655440000'
107110
108111describe ( '@regex' , ( ) => {
109112 describe ( 'alpha' , ( ) => {
@@ -495,6 +498,24 @@ describe('@regex', () => {
495498 } )
496499 } )
497500
501+ describe ( 'organizationAlias' , ( ) => {
502+ test . each ( [
503+ [ asciiLetters , false ] ,
504+ [ asciiLowercase , true ] ,
505+ [ asciiUppercase , false ] ,
506+ [ digitsTest , true ] ,
507+ [ emailTest , false ] ,
508+ [ octdigits , true ] ,
509+ [ hexdigits , false ] ,
510+ [ printable , false ] ,
511+ [ punctuation , false ] ,
512+ [ whitespace , false ] ,
513+ [ cronTest , false ] ,
514+ ] ) ( 'should match regex %s to be %s' , ( string , expected ) => {
515+ expect ( organizationAlias . test ( string ) ) . toBe ( expected )
516+ } )
517+ } )
518+
498519 describe ( 'ascii' , ( ) => {
499520 test . each ( [
500521 [ asciiLetters , true ] ,
@@ -1131,4 +1152,24 @@ describe('@regex', () => {
11311152 expect ( password . test ( string ) ) . toBe ( expected )
11321153 } )
11331154 } )
1155+
1156+ describe ( 'uuid' , ( ) => {
1157+ test . each ( [
1158+ [ asciiLetters , false ] ,
1159+ [ asciiLowercase , false ] ,
1160+ [ asciiUppercase , false ] ,
1161+ [ digitsTest , false ] ,
1162+ [ emailTest , false ] ,
1163+ [ octdigits , false ] ,
1164+ [ hexdigits , false ] ,
1165+ [ printable , false ] ,
1166+ [ punctuation , false ] ,
1167+ [ whitespace , false ] ,
1168+ [ cronTest , false ] ,
1169+ [ macAddress1 , false ] ,
1170+ [ uuidTest , true ] ,
1171+ ] ) ( 'should match regex %s to be %s' , ( string , expected ) => {
1172+ expect ( uuid . test ( string ) ) . toBe ( expected )
1173+ } )
1174+ } )
11341175} )
0 commit comments