Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4080 Widoki

hello odoo family 
i want to validate an valid email i know how to do it from python code but i want to do this using xml. below is my xml field


name="email"
widget="regex_mask" data-inputmask-regex='[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}'
context="{'gravatar_image': True}"

 but this thing is not working on email
i have also use widget="regex_mask"  data-inputmask-regex="^\d+$" on char filed and this is working fine

it would not take any character from keyboard 
i any one know how to do this ... please let me know i'm waiting for your answer :)



Awatar
Odrzuć
Autor Najlepsza odpowiedź

JQuery-Inputmask has \a built-in email mask extension.

So instead of your data-inputmask-regex attribute, you should be able to just replace it with

data-inputmask-alias="email"
and it will work fine and for more useful u can add placeholder for showing example
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 24
2582
3
kwi 24
5656
0
lip 22
1029
0
sie 21
3085