Skip to content

Commit

Permalink
chore: remove tag id and value max len
Browse files Browse the repository at this point in the history
  • Loading branch information
cameri committed May 5, 2023
1 parent eb07f49 commit e6ca10a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/schemas/base-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 0 additions & 2 deletions test/unit/schemas/event-schema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) },
],
}

Expand Down

0 comments on commit e6ca10a

Please sign in to comment.