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.

Allowing functions for Schema messages

See original GitHub issue

Why can i give a function to a label, but not to an message? This currently doesn’t allow me to i18n the error messages like this:

regEx: [
        {msg: function(){
                return TAPi18n.__('forms.error.regEx.msg');
            }
        },
        ...
       ]

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
frozemancommented, Oct 30, 2014

True.

But i would even though appreciate if i could define global schema messages the same way i can define labels, using a function:

SimpleSchema.messages({
    required: function(){ return i18n("my.label"); },
    minString:function(){ return i18n("my.otherlabel"); },
    maxString: "[label] cannot exceed [max] characters",
    minNumber: "[label] must be at least [min]",
0reactions
kainisoftcommented, Feb 11, 2016

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and managing schemas | Cloud Pub/Sub ...
Validating message schemas · In the Google Cloud console, go to the Pub/Sub schemas page. · Select the schema you want to view...
Read more >
Documentation: 15: CREATE FUNCTION - PostgreSQL
If a schema name is included, then the function is created in the specified schema. Otherwise it is created in the current schema....
Read more >
Pass schema's context to validation functions #289 - GitHub
I am thinking about a way to pass context to validation function. Currently validation function expect exactly one argument, ...
Read more >
Schema Registry Overview - Confluent Documentation
Schema Registry lives outside of and separately from your Kafka brokers. Your producers and consumers still talk to Kafka to publish and read...
Read more >
Create User-defined Functions (Database Engine) - SQL Server
Requires CREATE FUNCTION permission in the database and ALTER permission on the schema in which the function is being created. If the function...
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