1/** 2 * The regex validates the following formats: 3 * 'MMYY', 'MM/YY', 'MM / YY' 4 */ 5const validDateRegex = new RegExp(/\d{2}\s?\/?\s?\d{2}/) 6const hasNumber = new RegExp(/\d+/) 7 8Validation.add('validate-card-expiration-date', 'Please, enter a valid expiration date. For example 12 / 25.', function(value) { 9 return validDateRegex.test(value) 10}) 11 12Validation.add('validate-card-holder-length', 'Please, enter a valid name.', function(value) { 13 return value.length >= 3 && !hasNumber.test(value) 14}) 15 16Validation.add('validate-card-number-length', 'Please, enter a valid credit card number.', function(value) { 17 return value.length >= 10 18}) 19 20Validation.add('validate-cvv-length', 'Please, enter a valid credit card verification number.', function(value) { 21 return value.length >= 3 && value.length <= 4 22}) 23 24Validation.add('validate-installments', 'Please, select the number of installments.', function(value) { 25 return value >= 1 && value <= 12 26})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.