Skip to main content

Invalid email on User extension GUI

Posted by jes_tovar on Tue, 04/19/2016

Hi,
I have a very annoying issue: When I try to set the email address for an extension where the domain is longer than 3 digits (i.e local ) , GUI complains with the message: "Email Address is not specified or is invalid. It is required when voicemail notification by email is enabled"

For example, if the email is user@email.com works fine but if the email is user@email.local doesn't work

Needless to say the email I am using is correct.

is there an easy way to fix this? Something I can modify in the backend source code to prevent email validation ?


Submitted by thirdlane on Fri, 04/22/2016 Permalink

email is validated by checkEmail in file validate.js - you can just make it return false

Submitted by jes_tovar on Tue, 05/10/2016 Permalink

Hi,
Thanks for your prompt response, I found two validate.js files in the server:
/usr/libexec/webmin/asterisk/validate.js
/usr/libexec/webmin/asterisk/war/js/validate.js

and found checkEmail which I modified and set return false;

then, I reloaded the webmin service...

... however, it is still trying to validate the email...

I set some code on validate.js in order to check if this file was being used and I noticed it is not used at all. Can you please let me know if there is another place I need to change code?

Submitted by thirdlane on Tue, 05/17/2016 Permalink

Well, I was wrong about the validate.js - email address is no longer validated there and this has to be changed in our code.

It is actually hard to validate email address without being too restrictive so I wonder whether we should simply "relax" email checking and just check for the @ in the middle. Another option is to stay strict but just warn users when validation fails - instead of producing an error.