Hex Artifact Content
Not logged in

Artifact a2e7ae9ca248b0b5a24d16366ef28f7d021535d8:


0000: 69 6d 70 6f 72 74 20 7b 63 72 65 61 74 65 56 61  import {createVa
0010: 6c 69 64 61 74 6f 72 2c 20 72 65 71 75 69 72 65  lidator, require
0020: 64 7d 20 66 72 6f 6d 20 27 75 74 69 6c 73 2f 76  d} from 'utils/v
0030: 61 6c 69 64 61 74 69 6f 6e 27 0a 0a 63 6f 6e 73  alidation'..cons
0040: 74 20 4c 6f 67 69 6e 56 61 6c 69 64 61 74 69 6f  t LoginValidatio
0050: 6e 20 3d 20 63 72 65 61 74 65 56 61 6c 69 64 61  n = createValida
0060: 74 6f 72 28 7b 0a 20 20 75 73 65 72 6e 61 6d 65  tor({.  username
0070: 3a 20 5b 72 65 71 75 69 72 65 64 5d 2c 0a 20 20  : [required],.  
0080: 70 61 73 73 77 6f 72 64 3a 20 5b 72 65 71 75 69  password: [requi
0090: 72 65 64 5d 0a 7d 29 0a 65 78 70 6f 72 74 20 64  red].}).export d
00a0: 65 66 61 75 6c 74 20 4c 6f 67 69 6e 56 61 6c 69  efault LoginVali
00b0: 64 61 74 69 6f 6e 0a                             dation.