Textbox accept only numbers

hi all,
i want textbox accepts only numbers not( @#$%^&*() ) this special characters code for c#.net

Check this post:
http://forums.silverlight.net/forums/p/122127/275363.aspx#275363
HTH

Similar Messages

  • Need the textbox to accept only Numbers

    Hello I have a textbox to enter Ph no.
    this is the command
    htp.print(htf.formText('Enter Ph no:','17', '4',v_Ph_no))
    But here it accepts both numbers and characters.
    Is there a way to make the textbox accept only Numbers.
    Is there any simple way or do we need to use javascript like keypress?
    Thanks in advance.

    user7351276 wrote:
    Hello I have a textbox to enter Ph no.
    this is the command
    htp.print(htf.formText('Enter Ph no:','17', '4',v_Ph_no))
    But here it accepts both numbers and characters.
    Is there a way to make the textbox accept only Numbers.
    Is there any simple way or do we need to use javascript like keypress?
    Thanks in advance.What tool are you using to develop this? This particular forum is for the rdbms, which is not involved in front-end development. Perhaps you should check in the Forms forum at Forms

  • Is there any property in OPA for textbox - allow only numbers and hypen

    Hi,
    I am working in .net code with OPA rules engine. I have set of OPA screens with textboxes.I want to restrict the user to type only numbers and hypens for some of the text boxes(like phone no,ssn,zip code and so on).
    As you know,this can be done in .Net javascript/jquery.The problem is , we don't have any clue to identify which textboxes needs to be restricted(out of 25 textboxes in entire flow ,only 4 needs to be restricted). Currently,nly the idea we have based on the screen title and question(hard coding).But it's not the right solution.If the rulebase changed,it won't work.
    Is there any property/API in OPA end for textboxes to set to give some clue to front end developers(dotnet) not to allow other than numeric and hypen for these textboxes ? OPA developer has written some rules for this , but it will do the validation only after entering the value, we want to restrict the keyboard entry itself based on some property getting from OPA.
    Thanks.

    Thanks for your quick response, actually OPA developer added some regular expression to validate the textbox entry, as you said it's working properly after entering some values in textboxes.
    But, still i am looking to do the keyboard manual entry restriction in front end .NETcode based on some clue from OPA.I can understand keyboard entry restiction can't be done in OPA end. We use OPA rules engine to display the screens and textbox controls in front end .NET code.
    But if i get some clue from OPA ,like saying that,these are the textboxes having reg expression property for which you need to restrict only numbers and hypen.
    We have around 100 screens in the flow , out of which some of the screens have textboxes(out of that only few textboxes needs to be restricted only numbers and hypen) .
    Currently , i have some javascript code to restrict the keyboard entry ,but it's working common for all the textboxes, i want to restrict only few textboxes which should accept only numbers and hypens.If i get any property/clue from OPA, saying that this is the property for textbox for which you should restrict only numbers.
    Like , for example, multilinecount property for textboxes which should appear bigger. As of now,OPA developer doesn't have any clue about how to do this.
    Thanks,

  • Restrict a textInput component to accept only numbers from 0 to 250

    I want to restrict a textInput component to accept only
    numbers from 0 to 250. I know I can use restrict to some degree but
    all I can do is restrict it to 0-9 and use maxChars to 3 which
    allows any number from 000-999.
    I believe I could use the TextEvent.TEXT_INPUT and then write
    some code that will convert that event's text (i.e. the text
    entered into textInput component before it is actually added to the
    textInput component's text value) such that I do not allow values
    greater than 250 but I'm not sure what that code would be. Does
    anyone know an easier way to do this?

    use the change event to monitor the input value and if it's
    greater than 250 (after typing the text property as a number),
    assign the text property to be "250".

  • Field validation regular expression to accept only numbers

    Hello.
    I would like to have a field validation regular expression to accept only numbers - no characters. The list of pre-packaged regular expressions that are included with ApEx does not contain this and I am not a very good regular expression writer. Can anyone help?
    Thanks!
    Boris

    Under the Regular Expression validation all you need to have is:
    ^[[:digit:]]$For the email address it just depends how detailed you want it:
    ^((?>[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+\x20*|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*"\x20*)*(?<angle><))?((?!\.)(?>\.?[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+)+|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*")@(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]{2,}|\[(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d)){4}|[a-zA-Z\d\-]*[a-zA-Z\d]:((?=[\x01-\x7f])[^\\\[\]]|\\[\x01-\x7f])+)\])(?(angle)>)$or...
    [\w-]+@([\w-]+\.)+[\w-]+Hope these help
    Edited by: MikesHotRod on Sep 3, 2008 12:40 PM

  • How can i validate a Field so that it can accept only Numbers

    can any one help me to validate a filed so that it accepts only numbers if not alert user (client side JavaScript alert message)
    Iam using JSF and ADF BC as the Technologies in my application ..
    my requirement is to validate a filed so that i can accept only numbers in my jspx page..
    I had used ADF regularExpression Validator do so... but it results in exception
    java.lang.IllegalArgumentException: 'value' is not of type java.lang.String.
         at oracle.adf.view.faces.validator.ValidatorUtils.assertIsString(ValidatorUtils.java:36)
         at oracle.adf.view.faces.validator.RegExpValidator.validate(RegExpValidator.java:103)
         at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
    <af:validateRegExp pattern="[0-9]*"
    noMatchMessageDetail="Please enter Numbers only"/>
    Using validateRegExp i can only validate a field that accept String type data ..

    Hello experts,
    Am seeing the same problem while trying to validate an inputtext field that can only accept numbers. This input filed is part of a table ..Data expected here is an integer
    since that is what is gotten from my ejb/sent for update to the db.
    <af:inputText value="#{row.daysToReview}"
    required="#{bindings.AdminResultBeanresultBeanArray.attrDefs.days.mandatory}"
    columns="#{bindingsAdminResultBeanresultBeanArray.attrHints.days.displayWidth}"
    binding="#{backing_Admin.inputText2}"
    id="inputText2"
    label="#{res['admin.daysheader']}"
    autoSubmit="true">
    <af:validateRegExp pattern="[0-9]+"
    noMatchMessageDetail="Please enter a number"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.AdminResultBeanresultBeanArray.formats.days}"/>
    </af:inputText>
    java.lang.IllegalArgumentException: 'value' is not of type java.lang.String.
    at oracle.adf.view.faces.validator.ValidatorUtils.assertIsString(ValidatorUtils.java:36)
    at oracle.adf.view.faces.validator.RegExpValidator.validate(RegExpValidator.java:103)
    at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
    <af:validateRegExp pattern="[0-9]*"
    noMatchMessageDetail="Please enter Numbers only"/>
    Using validateRegExp i can only validate a field that accept String type data ..
    Thanks in advance.

  • How to Make JTextField Accept Only Specific Numbers?

    Hello There
    I've made 3 JTexfields That accepts only Numbers
    But I Want To Make Them Accpets Numbers only from 1 to 12
    and if the number is greater than 12 they don't accept it?
    another Thing That I've Set Their Columns To 2 meaning that i want the user to enter only two numbers
    but yet the user can enter many numbers how would i restrict entering numbers to only two numbers?
    here's my code:
      import java.awt.*;
      import javax.swing.*;
      import javax.swing.text.*;
      public class ManyText extends JFrame{
           public static void main(String[]args){
           JTextField[ ] text = new JTextField[3];
           JButton button=new JButton("Press");
        for(int i = 0; i < text.length; i++)
         text[i] = new JTextField(3);
         for(int i = 0; i < text.length; i++){
         text.setColumns(2);     
    text[i].setDocument(new PlainDocument(){
    public void insertString(int offs, String str,
    AttributeSet a) throws BadLocationException{
    if("0123456789".indexOf(str) < 0)
    java.awt.Toolkit.getDefaultToolkit().beep();
    return;
    super.insertString(offs, str, a);
         JFrame f=new JFrame();
         f.setSize(200,200);
         f.setLayout(new FlowLayout());
         f.add(text[0]);
    f.add(text[1]);
    f.add(text[2]);     
         f.setVisible(true);     

    ejp wrote:
    Actually I would suggest you're using the wrong control. I would use a JComboBox or a JSpinner for this.I suggested he use a JSpinner 1-2 threads ago. Maybe if he hears it enough, he'll believe it.

  • I purchased Elements 13 and everything downloaded great.  When I go to license the software before use the code wont accept letters, only numbers. My serial number has both.

    I can't use the software before a license it.  I am on the page to type in the serial number and it won't take letters only numbers.  This is very frustrating.

    Hi John,
    It seems you have got a redemption code. Try to follow the link mentioned below.
    Redemption Code Help
    https://helpx.adobe.com/x-productkb/global/find-serial-number-student-teacher.html
    https://helpx.adobe.com/x-productkb/global/find-serial-number.html
    Thanks,
    Atul Saini

  • IW32 - restriction or validation to accept only internal order from a plant

    HI team!!
    I´m needing your help
    Im working with Tcode IW32 when creating a maintenance order and we got through Goto / Settlement rule we can assign any internal order number.
    there is no restriction or validation to accept only internal order numbers from the corresponding plant, this condition may affect other entities
    How can I limit it?
    Thks & regards "

    In configuration, in settlement rule, restrict receiver other than internal order. In case if you want to have internal order as a receiver but restrict only some orders, you can do that using a user exit/badi at save.
    example user exit -IWO10009

  • Trying to get PS-Elements 13 licensed; the only "numbers" I have are the ones on the back of the box

    trying to get PS-Elements 13 licensed; the only "numbers" I have are the ones on the back of the box

    Got it...had to rip the packaging apart ..who would have thunk !!!ThanksIndy
          From: Little_Pale_Face <[email protected]>
    To: Indy Mangat <[email protected]>
    Sent: Monday, March 9, 2015 8:22 AM
    Subject:  trying to get PS-Elements 13 licensed; the only "numbers" I have are the ones on the back of the box
    trying to get PS-Elements 13 licensed; the only "numbers" I have are the ones on the back of the box
    created by Little_Pale_Face in Photoshop General Discussion - View the full discussionIs there not a plain white box inside the outer box - the serial number is usually on that. Serial number is 24 digits starting 1057 Brian If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7268188#7268188 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7268188#7268188 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Photoshop General Discussion by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Hi All can anyone help me, I have a Iphone 4s and I'm currently recieving nuisance calls via a blocked number is there anyway I can stop my phone accepting blocked numbers? Cheers

    Hi all I'm Currently recieving Nuisance Calls via a Blocked number is there anyway I can stop my Iphone accepting Blocked Numbers? Thanks

    There is a way! I'm very happy to share this and hope it helps those who find themselves plagued, as I was.
    I have been getting nuisance calls for months from some muppet, who hides his phone number before he calls at 3am. I need to keep my phone on, in case any of my immediate family have an emergency. I'm sure many have the same problem, just turning off the phone is not an option. I have been to two or three shops to ask the experts and none could offer me a solution. I was on the verge of tring to jailbreak my phone or even get rid of it to get an andriod one...That's how bad things had become.
    Anyway, this is my solution, which I found by trawling through page after page on the internet, for ages and trying various other solutions first. I have an iPhone 4S and the operating system is 6.1.3 and I am in the UK, on Orange, or EE as we should now call it. I cannot promise it will help everyone, but it works for me.
    Go to Settings, Do Not Disturb and switch this on. Underneath here, go to Notifications, then Do Not Disturb again. Then Scheduled and set the times you want the restrictions to start and end. For example, I use 7pm to 8am, so that I know I won't get nuisance calls during this period, but whatever times work for you. Underneath, it says Allow calls from and you can select your favourites. If you haven't saved any of your contacts as Favourites, do so, it's very easy. Just go to contacts, open one and underneath the number there is a button to Add to favourites. Repeat for all close friends and family you want to be able to reach you at any time. All your favourites should be allowed to call. I think you can have 50 numbers in the favourites. But any unknown caller should be simply sent to voicemail.
    Apple have had some previous issues with the Do Not Disturb feature and to be honest this didnt work 100% of the time for me. If you find the same, don't give up. I suggest you do as I did at this point and use an app called Call Bliss, which seems to have cracked it. (I have NO connection to them and it's no skin off my nose if you use this app or not). There may be other apps that do the same, or even better for all I know. You have a free one day trial then it's £3 if you want to continue to use it. For me, £3 to solve the problem was money very well spent. If you need this app, download it, then do as suggested above to the point where it says Allow calls from and this time you select Bliss Exceptions. Follow the instructions in the app.
    There are two modes, I use suppress mode, which allows all calls to get through except those from unknown callers and those specified by you. I believe the other mode blocks all calls, except those you specify. Please note, the app only works when the iPhone is locked. Your lock might come on after the phone is not used for 5 minutes or so, or you can lock the phone by single clicking the on/off button (not holding it down).
    I hope this helps anyone as much as it has done me.

  • A more efficient way to assure that a string value contains only numbers?

    Hi ,
    I'm using Oracle 9.2.0.6.
    I was curious to know if there was any way I could write a more efficient query to determine if a string value contains only numbers.
    Here's my current query. This SQL is from a sub query in a Join clause.
    select distinct cta.CUSTOMER_TRX_ID, to_number(cta.SALES_ORDER) SALES_ORDER
                from ra_customer_trx_lines_all cta
                where length(cta.SALES_ORDER) = 6
                and cta.SALES_ORDER is not null
                and substr(cta.SALES_ORDER,1,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,2,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,3,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,4,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,5,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,6,1) in('1','2','3','4','5','6','7','8','9','0')This is a string where I'm finding A-Z-a-z characters and '/' and '-' characters in all 6 positions, plus there are values that are longer than 6 characters. That's what the length(cta.SALES_ORDER) = 6 is for. Also, of course. some cells are NULL.
    So the question is, is there a more efficient way to screen out only the values in this field that are 6 character numbers or is what I have the best I can do?
    Thanks,

    I appreciate all of your very helpfull workarounds. The cost is a little better in all cases than my original where clause.
    To address the discussion that's popped up about design from this question, I can say a few things that should clear , at least, my situation up.
    First of all this custom quoting , purchase order , and sales order entry system WAS written by a bunch a of 'bad' coders who didn't document their work and then left. We don't even have an ER diagram
    The whole project that I'm only a small part of is literally trying to put Humpty Dumpty together again and then move it from a bad custom solution into Oracle Applications.
    We're rebuilding, documenting, and doing ETL. This is one of your prototypical projects from hell.
    It's a huge database project so we're taking small bites as a time. Hopefully, somewhere right before Armageddon hits, this thing will be complete.
    But until then,..., well,..., you know the drill.
    Thanks Again.

  • XSLT mapping requirement.. Only numbers need to be picked..!!

    Hi ,
    XSLT mapping requirement.
    I will be getting the value as mix of numbers and alphabets like " 1343: -BIZ USA ".
    I need to pick only number '1343' from the input field.
    Is there any function in XSLT to pick only numbers and ignore alphabets?
    Thanks
    Deepthi

    Hi There,
    The below piece of code could cater your requirement, for flltering the non digit chars from your field,
    <xsl:value-of select="translate(<your field name>, translate(<your field name>, '0123456789', ''), '')"/>
    This would separate the non numeric chars from your field in mapping.
    Let me know this works.
    Regards,
    Rajesh Kumar T

  • Trying to install Adobe Photodeluxe (elements 13)   I have box and cd sleeve with serial number,   But registration won't let me type letters only numbers allowed.  Help please.

    Trying to install Adobe Photodeluxe (elements 13)   I have box and cd sleeve with serial number,   But registration won't let me type letters only numbers allowed.  Help please.

    You possibly have a redemption code which has to be converted into a serial number.
    https://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • How to restrict the text field to enter only numbers???

    I have used "onkeyup" event to call a function "test", I am getting the alert message for every entry (even for a number), I dont know why I am getting this. Please help me out.....
    Number1 : <input type="text" name="myin1" id="a" onkeyup="test(this,event)">
    function test(ff,evt)
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :
    ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
    alert("Only numbers are allowed"); }
    }

    Hi,
    However this is java forum and you are asking for a solution of a javascript problem,
    I think I got the problem.
    This script works fine when I run it on IE and use the numeric keys above the text keys,
    but give error when I use the numerical keypad on the right.
    I think you should change your if condition like this
    if (charCode > 31 && ((charCode < 48 || charCode > 57) || (charCode < 96 || charCode > 105)) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • "Page scaling : Tile large pages" missing in Acrobat Pro 8

    Hi, for some reason, the print option to print tiles of an over-sized document is not visible in my installation of Acrobat Pro version 8 for Windows. Does anybody know how I can get this option? Any help is appreciated. Arman

  • 11.1.5 installed yesterday now it wont see iphone or open itunes

    11.1.5 installed yesterday now it wont see iphone or open itune - has anyone encountered a similar problem?

  • StandBy database creation in oracle 10g

    Respected Sir's I have to create stand by database in oracle 10g i am working on (Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod) .Plz any body provide steps required for creating stand by database in oracle10g.Both the database db1

  • Document authorization check

    Hello, Is there a BAPI call, that being given a pair 'user name' + 'document number' will say whether the user is authorized for at least read access?

  • Tomcat, htaccess, can it be done?

    Hi all, I'm running tomcat via apache via the appropriate connector. I had a directory under a web application, which I secured using htaccess. Fine, got the password working and everything, apache correctly protected the directory itself, and html c