It's quite easier to check if text contains only digits and (or) other
symbols which are available in a phone number.
But which symbols are available in phone number? +, whitespace, (, ), -,
any suggestions?

I want to write something like this:

var containsNumber = /^[0-9\s\+\-\(\)]+$/
var containsLetter = !containsNumber

2015-06-19 1:52 GMT+03:00 Roman Shchekin <mrqt...@gmail.com>:

> Who wrote this code?
>     *var containsLetter = /^[a-zA-Z]/.test(value)*
> Are you serious? English-only letter checking in OS with best
> internationalization. Can I unsee this?
>
> I will propose fix now.
>
> 2015-06-12 17:38 GMT+03:00 Christian Dywan <christian.dy...@canonical.com>
> :
>
>> More specifically
>>
>>
>> https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/address-book-app/wily/view/head:/src/imports/Ubuntu/Contacts/ContactListModel.qml
>>
>> The looks a bit suspicious:
>>
>>     var containsLetter = /^[a-zA-Z]/.test(value)
>>
>>
>> Am Fr, 12. Jun, 2015 um 9:28 schrieb Sebastien Bacher <
>> sebastien.bac...@canonical.com>:
>>
>> Le 12/06/2015 15:17, Simos Xenitellis a écrit :
>>
>>
>> I did not find something relevant in the source regarding to searching or
>> filtering,
>>
>> https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/address-book-app/wily/files/head:/src/app/
>>  Where does the search take place?
>>
>>  Simos
>>
>>
>> It seems to be in that source
>>
>> https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/address-book-app/wily/view/head:/src/imports/ContactList/ContactListPage.qml
>>
>> Cheers,
>> Sebastien Bacher
>>
>>
>> --
>> Mailing list: https://launchpad.net/~ubuntu-phone
>> Post to     : ubuntu-phone@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~ubuntu-phone
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
-- 
Mailing list: https://launchpad.net/~ubuntu-phone
Post to     : ubuntu-phone@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help   : https://help.launchpad.net/ListHelp

Reply via email to