Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
APF-2362: Add localized label and validator descriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bard <[email protected]>
  • Loading branch information
Ryan Bard committed Jul 8, 2019
1 parent cd3402d commit 468c163
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions samples/node/routes/discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,38 @@ exports.root = function (req, res) {
foo: {
default: 'bar',
type: 'STRING',
label: {
'en-US': 'Foo',
'es-ES': 'Foo'
},
description: {
'en-US': 'This ...',
'es-ES': 'Este ...'
},
validators: [
{type: 'required'},
{type: 'regex', value: '^\\w+$'},
{type: 'max_length', value: '10'}
{
type: 'required',
description: {
'en-US': 'Foo is required',
'es-ES': '...'
}
},
{
type: 'regex',
value: '^\\w+$',
description: {
'en-US': 'Foo must be only letters and number',
'es-ES': '...'
}
},
{
type: 'max_length',
value: '10',
description: {
'en-US': 'Foo must not be more than 10 characters',
'es-ES': '...'
}
}
]
}
},
Expand Down

0 comments on commit 468c163

Please sign in to comment.