Using Java swing, what is the string that correspond to a correct email mask when using the MaskFormatter
?
Is that possible at all to actually use a MaskFormatter
for emails?
views:
312answers:
1
+1
A:
As much as it does make sorta sense to use a MaskFormatter, I don't think it is the most logical answer. Because the length of an email address can vary greatly before and after the @ sign. So you could give the MaskFormatter a huge upper limit of 255 * before and after the @ sign, but that would create some hideous code. I would suggest validating the email address on submit or something along those lines. Hope that helps.
daub815
2008-10-15 02:20:31