Global attribute names for language
See original GitHub issueI 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been tagged as a feature request and will consider this addition for a future release.
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