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.

Global attribute names for language

See original GitHub issue

I know how to set custom attribute names for an instance of validator but I want to know is it possible to set them globally? (i need something like below): var validator = require('validatorjs'); validator.useLang('fa'); validator.setAttributes('fa',{ age: 'سن', full_name: 'نام کامل', ... });

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mikeericksoncommented, Feb 28, 2018

This has been tagged as a feature request and will consider this addition for a future release.

1reaction
alisherafat01commented, Feb 28, 2018

Hi @vict-shevchenko Translation of hex rule for fa_IR is: hex: 'فیلد :attribute باید در فرمت مبنای ۱۶ باشد'

As answered herer Laravel validator has option to modify attributeNames for a specific language globally and there is nothing wrong with that and is good thing to implement here.

actually attributes:{} property should be modifiable here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Global attributes - HTML: HyperText Markup Language | MDN
Chrome Edge accesskey Full support. ChromeYes. Toggle history Full support. Edge12. Tog... autocapitalize Full support. Chrome43. Toggle history Full support. Edge79. Tog... autocomplete Full support. ChromeYes....
Read more >
3.2.3 Global attributes — HTML5: Edition for Web Authors - W3C
The lang attribute (in no namespace) specifies the primary language for the element's contents and for any of the element's attributes that contain...
Read more >
HTML Global lang Attribute - W3Schools
The lang attribute specifies the language of the element's content. Common examples are "en" for English, "es" for Spanish, "fr" for French, and...
Read more >
HTML Global Attributes - Dofactory
Global Attributes are attributes that can be on any HTML element. Examples include id, class, style, data-*, title, and others. Example. #. A ......
Read more >
HTML Global Attributes - W3docs
HTML Global Attributes ; lang, Defines the content language of the element. For this purpose lang or hreflang language attributes are generally used....
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