question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow objects in "allowedValues"

See original GitHub issue

Allowing objects in allowedValues would greatly help form generation as it would provide a label for dropdowns and listboxes.

For instance:

role: {
   type: String,
   label: "Role",
   allowedValues: {
      admin: i18n('admin'),
      moderator: i18n('moderator'),
      ...
   }
}

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
aldeedcommented, Jun 4, 2014

For schema validation, yes. For form generation, no. But you could of course define your options object in one place and pass _.keys(optionsObject) to allowedValues.

0reactions
aldeedcommented, Jun 17, 2014

An initial implementation of autoform field defaults in the schema is now released. If it doesn’t meet all needs, you can submit additional specific issues and requests in the autoform repo.

https://github.com/aldeed/meteor-autoform/blob/master/CHANGELOG.md#0120

Read more comments on GitHub >

github_iconTop Results From Across the Web

ARM template allowed values for object - Microsoft Q&A
I want to deploy e.g. a resource group with specific tags. These tags are a parameter object. How can I assign allowedValues to...
Read more >
Parameters - AWS CloudFormation
An array containing the list of values allowed for the parameter. ... to a parameter of type String , the parameter value must...
Read more >
predicateForObjects(withDeviceProperty:allowedValues:)
A predicate that matches all objects created by a device whose specified property matches one of the allowed values. Discussion. Use this convenience...
Read more >
Is there a way to declare "allowed values" for a property? #51
Let's take this as an example. Here, it appears by using enum we are specifying the allowed values... { "type": "object", "properties" ...
Read more >
REST API for Oracle Identity Cloud Service - Define Allowed ...
Define Allowed Values. post. /admin/v1/AllowedValues ... AllowedValue schema. Before you specify an attribute-value ... Type: object. Allowed Values schema.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found