How to change the language for default validation feedback?

0
The default language for my application is set to English, and this is the only option for users, however when I try to enter a letter into an input field which is expecting a number, the validation message shown is " Ongeldig nummer " Is there any way I can change this to English? If this is not possible, can anyone suggest the regular expression I could add to a microflow  to check that the input into the field is an integer, so that I could create my own validation message?
asked
2 answers
3

Bryn,

Was there previously another language in you project? Also is this a default mendix validation or are you using the validation feedback activity?

 

A regular expression that checks for a number would be this

^[0-9]*$

 

You can test that regex on this website

https://www.regextester.com/21

 

Edit:

 

In your modeler, go to tools > Batch translate or batch replace to and search "Ongeldig nummer". You can probably use either to change the this text to "Invalid number"

 

here is the mendix documentation to translating app content

https://docs.mendix.com/howto/collaboration-project-management/translate-your-app-content

 

 

Edit 2: I downloaded the widget and did a search for "Ongeldig nummer" and found where this is being validated.

 

If you want to change this widget, you can use 7zip on the .mpk to open the archive. Navigate to through the folders BootstrapInput Addons > widget > and then right click to edit the Bootstrapinputaddons.js file. This will open notepad with the code and you can do a ctrl - F to find "Ongeldig nummer" and change it to whatever you want it to be. Save the file and exit out of notepad and 7zip will ask if you want to update the archive, click yes. 

 

Optionally, you can copy that .js file to your desktop and edit with any text editor, and then update the archive with 7zip.

 

answered
1

The validation message is hardcoded in the widget.

See: https://github.com/JAM-IT-NL/MendixBootstrapInputAddons/blob/master/src/BootstrapInputAddons/widget/BootstrapInputAddons.js

answered