In my validation message I’m using
TAPi18n strings as follows but all I’m getting is the default english version:
username: [ Validators.required(null, TAPi18n.__('provideUsernameMessage', null, 'am')), Validators.string(), Validators.minLength(5, TAPi18n.__('usernameShortMessage', null, "am")) ],
It should be giving out the error message in Amharic, i.e. “የተጠቃሚ ስሙን ያስገብ” and “የተጠቃሚ ስሙ ፊደሎች ከ5 ወይም ከ5 በላይ መሆን አለባቸው”. I’ve tried elsewhere on the server side these messages do appear. How can I fix this?
t = Things.findOne(); // t.getClass() === 'Thing'
As I'm using the result of .validate( in form validation, it's somewhat difficult to rewrite it for asynchronous handling.
Is there a reason for async validation other then server side processing? Maybe a way of doing client-only validation could be added?
Hm, looked in the code and it seems as server side validation is now somehow a must. Or am I overlooking something?
Looks like client side validation can be disabled with
simulation argument, but not server validation.
I'm not yet convinced with this approach. I don't care if e.g the length of the first name of a user is valid according to the server. I'd like a check like this to be client only to be fast and easy for client only validations e.g for forms.
When submitting the form I do care about server-side validation - but not before. Its extra load for the server for no good reason