[CLOSED] Special char problem

  1. #1

    [CLOSED] Special char problem

    hi,

    Textfield is not allowed special chars when i type , but its allowed special chars if copy and paste it... how to avoid it?

    
    
    
    
    <ext:TextField ID="cltfDeliveryName" runat="server" MaskRe="[a-zA-Z]"  MaxLength="50" AllowBlank="false"</p>
    
    
    BlankText="Delivery instruction name is required"></p>
    
    
    </ext:TextField>
    </p>
  2. #2

    RE: [CLOSED] Special char problem

    Hi,

    Unfortunatelly, javascript doesn't allow intercept (and any another actions) clipboard
    Therefore I can suggest to use own validation which allows to mark field as invalid when you paste (on blur event)
    Validator="function(value){return /[a-zA-Z]+/.test(value);}"
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    Validator

    hi,

    i have follow your suggestion, but its not showing validation mark in blur event.. plz see my code and send sample...

    <ext:NumberField ID="cltfRate2" Validator="function(value){return /[a-zA-Z]+/.test(value);}" MinValue="0.1" MaskRe="[0-9.]" AllowDecimals="true" DecimalSeparator="." runat="server" MaxLength="5" 
    BlankText="Rate2 is required">
    
    </ext:NumberField>
  4. #4
    Hi,

    Please post code in the correct format (your code is unreadble now), just post code in the text format (it seems that pasted the html)
    Vladimir Shcheglov
    Sr. Developer
  5. #5

    validation

    hi,

    i have follow your suggestion, but its not showing validation mark in blur event.. plz see my code and send sample...

    <ext:NumberField ID="cltfRate1" Validator="function(value){return /[a-zA-Z]+/.test(value);}" MinValue="0.1" MaskRe="[0-9.]"  AllowDecimals="true" DecimalSeparator="." runat="server" MaxLength="5" EnableKeyEvents="true"
                                                        BlankText="Rate1 is required">                                                  
                                                    </ext:NumberField>
  6. #6
    Hi,

    For NumberField you have to use another validator, you must check numbers instead letters
    Validator="function(value){return /[0-9.]+/.test(value);}"
    Vladimir Shcheglov
    Sr. Developer
  7. #7

    Validation fail

    hi,
    The validation mark not shown, if i copy and paste the 1.5 value in Numberfield.plz check the below code...




    <ext:NumberField ID="cltfSecond" MinValue="1" Validator="function(value){return /[0-9]+/.test(value);}" MaskRe="[0-9]" runat="server" MaxLength="3" AllowNegative="false" AllowDecimals="false" EnableKeyEvents="true"
    BlankText="Seconds required">
    
    </ext:NumberField>
  8. #8
    Hi,

    Try the following Validator
    Validator="function(value){return /^[0-9]+$/.test(value);}"
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Problem with special character "< >"
    By fac in forum 2.x Help
    Replies: 1
    Last Post: Jun 28, 2012, 9:44 PM
  2. input text mask with L literal char
    By Wirianto Widjaya in forum 1.x Help
    Replies: 4
    Last Post: Mar 30, 2012, 6:35 AM
  3. Allow '+' char in NumberField
    By wdk in forum 1.x Help
    Replies: 5
    Last Post: Apr 27, 2011, 5:39 AM
  4. [CLOSED] Special symbols escaping problem
    By acrossdev in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 21, 2009, 12:16 AM
  5. [CLOSED] Turkish special characters problem
    By tansu in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 26, 2009, 12:01 PM

Posting Permissions