Search Unity

Bug TextMeshPro TMP_PhoneNumberValidator.cs line 20 bug

Discussion in 'UGUI & TextMesh Pro' started by Daniel-F, Mar 14, 2023.

  1. Daniel-F

    Daniel-F

    Joined:
    May 15, 2013
    Posts:
    26
    On line 20 of TMP_PhoneNumberValidator.cs:
    Code (CSharp):
    1. if (ch < '0' && ch > '9') return (char)0;
    will never be true as ch can't be simultaneously < '0' and > '9'. It was presumably intended to use OR rather than AND.