mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 13:21:45 +01:00
chore: remove tag id and value max len
This commit is contained in:
parent
eb07f49846
commit
e6ca10a0ce
@ -18,6 +18,6 @@ export const createdAtSchema = Schema.number().min(0).multiple(1).custom(seconds
|
||||
|
||||
// [<string>, <string> 0..*]
|
||||
export const tagSchema = Schema.array()
|
||||
.ordered(Schema.string().max(255).required().label('identifier'))
|
||||
.items(Schema.string().allow('').max(1024).label('value'))
|
||||
.ordered(Schema.string().required().label('identifier'))
|
||||
.items(Schema.string().allow('').label('value'))
|
||||
.label('tag')
|
||||
|
@ -119,12 +119,10 @@ describe('NIP-01', () => {
|
||||
],
|
||||
identifier: [
|
||||
{ message: 'must be a string', transform: assocPath(['tags', 0, 0], null) },
|
||||
{ message: 'length must be less than or equal to 255 characters long', transform: assocPath(['tags', 0, 0], ' '.repeat(256)) },
|
||||
{ message: 'is not allowed to be empty', transform: assocPath(['tags', 0, 0], '') },
|
||||
],
|
||||
value: [
|
||||
{ message: 'must be a string', transform: assocPath(['tags', 0, 1], null) },
|
||||
{ message: 'length must be less than or equal to 1024 characters long', transform: assocPath(['tags', 0, 1], ' '.repeat(1024 + 1)) },
|
||||
],
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user