Use SpryValidationTextField to check Currency Decimals

I have a SpryValidationTextField widget defined in my form to
see whether a currency field has a certain minimum value. It works
fine as lomg as I integer values as minimum values. As soon as I
use decimals the valuation starts going horrorably wrong; the
system will allow any value to pass really, as long as they have
the correct format.
I assume this is a bug of the validation function.
Can an Adobe member of the forum please suggest an
appropriate fix or point out what I am doing wrong.
<span id="sprytextfield1">
<input type="text" name="cost" id="cost" value="0.00"
size="32" />
<span class="textfieldRequiredMsg">A value is
required.</span><span
class="textfieldInvalidFormatMsg">Invalid
format.</span><span class="textfieldMinValueMsg">The
entered value is less than the minimum
required.</span><span class="textfieldMaxValueMsg">The
entered value is greater than the maximum
allowed.</span></span>
<script type="text/javascript">
<!--
var sprytextfield1 = new
Spry.Widget.ValidationTextField("sprytextfield1", "currency",
{validateOn:["blur"], minValue:0.5, maxValue:1000,
useCharacterMasking:true, hint:"Cost in account currency"});
//-->
</script>

This looks like it may be a bug in the
SpryValidationTextField code. You can work around the problem by
quoting your min and max values and if you are going to specify a
digit after the decimal point, make sure there are 2 digits. So in
your example, change:
minValue: 0.5
to
minValue: "0.50"
--== Kin ==--

Similar Messages

  • Use SpryValidationTextField to check MAC address

    Goal: I would like to have a data entry check in a text field
    that confirms a properly formed MAC address was entered.
    My attempt: I created a SpryValidationTextField of type
    custom with a pattern 00-00-00-00-00-00 and 'Enforce Pattern'
    ticked. The issue is that the system will not allow me to enter
    letters A-F for hexadecimal vlaues but only digits 0-9.
    Vice versa if I enter the pattern AA-AA-AA-AA-AA-AA the
    system will not allow me to enter any digits 0-9 but all
    characters.
    What I need is a check that allows all values 0-9/A-F with
    letters preferably automatically converted to capital letters, when
    entered in small characters, while preserving the integrity of the
    pattern 00-00-00-00-00-00.
    Can anyone help?

    A slight modification to the suggestions and it now works
    perfect. The improvement handles the error messaging perfectly well
    but also ensures that a complete MAC address is entered ( the
    preliminary solution given below allowed accepted a MAC address of
    16 characters as valid).
    Thanks for cw2ureg and V1 Fusion for their input. All credit
    to them
    HTML:
    <span id="sprytextfield1">
    <input type="text" name="mac" value="" size="17" />
    <span class="textfieldRequiredMsg">A value is
    required.</span><span
    class="textfieldMinCharsMsg">Minimum number of characters not
    met.</span><span class="textfieldMaxCharsMsg">Exceeded
    maximum number of characters.</span><span
    class="textfieldInvalidFormatMsg">Not a valid MAC
    address</span></span>
    Constructor:
    var sprytextfield1 = new
    Spry.Widget.ValidationTextField("sprytextfield1", "none",
    {validation: fnValidateMacAddress, validateOn:["blur"],
    hint:"00-00-00-00-00-00", minChars:17, maxChars:17});
    Function:
    function fnValidateMacAddress(macaddr) {
    var reg1 =
    /^[A-Fa-f0-9]{1,2}\-[A-Fa-f0-9]{1,2}\-[A-Fa-f0-9]{1,2}\-[A-Fa-f0-9]{1,2}\-[A-Fa-f0-9]{1,2 }\-[A-Fa-f0-9]{1,2}$/;
    var reg2 =
    /^[A-Fa-f0-9]{1,2}\:[A-Fa-f0-9]{1,2}\:[A-Fa-f0-9]{1,2}\:[A-Fa-f0-9]{1,2}\:[A-Fa-f0-9]{1,2 }\:[A-Fa-f0-9]{1,2}$/;
    if (reg1.test(macaddr)) {
    return true;
    }else if (reg2.test(macaddr)) {
    return true;
    } else {
    return false;

  • Currency Decimals in workflow inbox

    In my workflow, after the user enter the incoming invoice (MIRO) will send out a email with PO number, amount, currency to manager inbox, the manager will approve it.
    Right now, it not worked for non decimal currencies, such JPY, KRW. for example, the amount is 1000JPY will display as 100.00 JPY in manger inbox.
    I know i can use 'FWOS_CURRENCY_DECIMALS_READ' to get local currency decimal , or use write amount to field with currecny to process it in the report, but now i do not know how to process it in workflow inbox, where  should i put my codes to display the amount with right currency decimals?
    Thanks!

    Please check the Task container If it is appearing properly there it will surely appear in Task Description. If everything in binding is fine then I think you have to refres Buffer(SWU_OBUF) Logout and Login and test. If after also it does not work have a coffee at ur coffee corner and come a little bit later to test.:)))
    Thanks
    Arghadip

  • TS3899 I can  no longer send photos in an email from my iphone 5. It uploads the photo to the "new message" page - and then it freezes. I can use safari and check my emails, and when the email part is frozen the rest of the phone works fine ! any advice?!

    I can no longer send photos in an email from my iphone 5. It uploads the photo the the "mew message" page and then it freezes! I can use safari and check my emails, and when the email part is frozen I can still use the rest of my phone. Any advice ?!?

    Hi, ireland a. 
    I would recommend closing any open applications in multitasking and restarting the device.  If unfamiliar with multitasking, I have included a screenshot on how to process an application close. 
    iOS: Force an app to close
    Once these steps are processed, attempt to send the photo again. 
    iPhoto for iOS (iPhone): Send photos by email
    http://support.apple.com/kb/PH3271
    Regards,
    Jason H. 

  • TS3899 "cannot get mail" in iphone5 suddenly. been using iphone to check 2 email accounts for months now, one is gmail and not troubled. the other is thunderbird and i get this error message now. no settings have been changed or anything! ideas?

    hey all, I have been getting the "cannot get mail" error message on my iphone5 suddenly.
    ive been using iphone to check two email accounts for months now, one is gmail and not troubled. the other is mail from thunderbird and i get this error message now saying it is not responding. no settings have been changed or anything, it just suddenly stopped receiving mail on my device as of Tuesday afternoon.
    Does anyone have iny ideas about why? i have yet to update to the new OS7 yet, could that be it?

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • "Always Use Selected Format" check box in line items report

    Hi Experts,
    I have an issue in ECC 6.0.
    From the transaction code FBL1N (Vendor Line Items) I am trying to export the report to spreadsheet by selecting the option  List> Export>Spreadsheet  then I have selected "Always Use Selected Format" check box.  But if I execute the same report again I am not getting this option "Always Use Selected Format". Please let me how can we retrieve that option. Is there any possibility to get that option again either functionally or technically. I would like to know all the possible ways to get this option again.
    Please do the needful.

    Hello,
    In one my thread Mr. Frank has replied as follows. I believe he has solved this.
    Hope this may be really helpful.
    The problem with the spreadsheet download is at one point, users have selected their default file type.
    That said, SAPGUI is working as it should. (gui710)
    Question though is how do we reset the values so they get the ?Select Spreadsheet Format? popup again.
    The following steps should be performed :
    - Call transaction SE38, enter program SALV_BS_ADMIN_MAINTAIN, and press F8.
    - Follow the parameters below :
    - Select ?DELETE? on the Actions Group
    - Select ?DETAILED SELECTION? on the General Data :
    - On Client - your number
    - User : <user name>
    -Hit EXECUTE.
    -Press ENTER on the POPUP
    - If there is an entry in the report that will need to be deleted. Also, make sure that the entry you will delete (for the user) has a value of GUI_ALV_XML_VER on field ?Parameter? .
    - Select the line and hit the DELETE icon .
    - Press ?Y? to continue delete. Press ENTER on the popup.
    - Then EXIT all the way out of the program.
    NOTE : When you run program SALV_BS_ADMIN_MAINTAIN, make sure they are out of any program that they are using for download.
    Re: "Always Use Selected Format" check box in line items report
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on May 15, 2009 2:31 PM

  • Using javascript to check datatype

    Hi again, I have a database name "cars"
    name    VARCHAR2(10)
    model   VARCHAR2(10)
    year     Date
    price NUMBER
    I have a form which staff fill in those details then save it.
    I am doing a client side validation. I AM ALSO DOING A SERVER SIDE TOO.
    Because the form is very long and takes about 15 mins to fill in a form. Basically I want to use javascript to check individual datatype in the database to check if whatever the user types in can fit into each datatype.
    Hope that makes sense.
    Thanks for your help.

    jquery is tightly integrated with apex. you will have to do the validation using jquery/javascript. check the following links
    Documentation | jQuery Validation Plugin
    jQuery Validation Plugin | Form validation with jQuery – this site is a work in progress
    javascript - Data type validation using jQuery Validation plugin - Stack Overflow
    [Solved] how can i do data type check validation using jquery ? - CodeProject
    Regards,
    Vishal

  • How to use the AUTHORITY-CHECK in ABAP

    I am a security guy but am trying to understand how the AUTHORITY-CHECK works. I have read the help on it but it doesn't answer to my understanding. I want a check in a report so that no matter what the user selects the program goes out and checks the authorization in the users master record and only displays what he has access to. I am sure this is basic but I am not a programmer.
    Thanks

    Hi Greg,
      Basically a AUTHORITY-CHECK is a programmatic way to check a auth object a user has.  This is only as good as the person writing the code makes is.
    Here is a basic example of how it could work.  Lets say you have auth objects for users that limit them to see company code. User A can see cc 10, User B can see cc 20 and user C can see both.
    In the code the programmer would have to first do the authcheck to see what CC the user has access to.  Then they would have to limit his reporting based on the results of the authority check.  So they might do it by saying SELECT * FROM XYZTAB WHERE COMPANY CODE = AUTHCC
    This is what I think you are looking for.  There are other ways to use the auth check.  You can do a check and end the program with a message if they don't have authorization. 
    If you need more info, let me know
    John

  • How To Use PMD Code Checker in Jdeveloper 9

    Hai
    Please Any one tell me How To Use PMD Code Checker in Jdeveloper 9
    Thanks

    Timo
    You Checking file with PMD in **Jdeveloper** possible in jdev 10.1.3
    for the earlier versions you told me to use command prompt
    that's why when iam checking my file with pmd the output is like the below:
    D:\jdev9\OAF\jdevbin\jdev\lib\ext\pmd-bin-4.2.5\pmd-4.2.5\java14\bin>pmd D:/satyas/Test.java xml rulesets/unusedcode.xml -debug
    In JDK 1.5 mode
    Loaded rule UnusedPrivateMethod
    Loaded rule UnusedPrivateField
    Loaded rule UnusedFormalParameter
    Loaded rule UnusedLocalVariable
    Processing D:\satyas\Test.java
    Could not find class Test, due to: java.lang.ClassNotFoundException: Test
    <?xml version="1.0" encoding="UTF-8"?>
    <pmd version="4.2.5" timestamp="2010-08-24T19:02:07.019">
    <file name="D:\satyas\Test.java">
    <violation beginline="5" endline="5" begincolumn="22" endcolumn="22" rule="UnusedLocalVariable" ruleset="Unused Code Rules" class=
    "Test" method="main" variable="i" externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedLocalVariable" priority=
    "3">
    Avoid unused local variables such as 'i'.
    </violation>
    <violation beginline="14" endline="14" begincolumn="23" endcolumn="32" rule="UnusedPrivateMethod" ruleset="Unused Code Rules" clas
    s="Test" method="myMethod" externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#UnusedPrivateMethod" priority="3">
    Avoid unused private methods such as 'myMethod()'.
    </violation>
    </file>
    </pmd>

  • Credit value used in credit check

    Hi,
    Could any one help me understand how credit value is calculated in credit check for sales orders.
    I was assuming that credit value is undelivered value returned by fm -SD_CREDIT_VALUE_ORDER.
    When i debug this fm gives me different value each time.Acoording to the config Total amount of order(incl tax) should be used for credit check.
    Thanks in advance.
    Priya.

    Hope you have released the credit block and then when you are changing any parameter(other than qty and value) the order is going on credit check again? If yes, in OVA8 - under " Released orders are still unchecked" maintain number of days or percentage of change of value. Then the reeleased orders will not be checked again .
    If you havent released the credit blocked order and when ever you do any changes to order and save it, you will get the credit blocked message all the times. If the amount is not consistent then may be you can execute few programs to reset the open credit value of the customers. Please refer to the below notes for incorrect credit values.
    Note 1176872 - Composite SAP Note Incorrect credit Updated
    Note 124571 - Incorrect credit values S066 S067 FD32
    Note 377165 - Update open credit values for credit management
    Note 716141 - Analysis Incorrect open credit values
    Note 425483 Consulting notes Credit Checks
    Regards
    Sai

  • How to use dreamweaver to check scripts.

    I am both new to scripting and in using dreamweaver, I n
    eed to be able to copy an asp code and paste in dreamweaver and c
    ontinue with it, can anyone please help me on how to do this? , I a
    m testing dream weaver cs4

    I don't understand your subject line, "How to use dreamweaver to check scripts".  Can you explain what you mean by this?
    >I need to be able to copy an asp code and paste in dreamweaver and
    >continue with it, can anyone please help me on how to do this?
    You just copy the code from one page and paste into another. If you are having problems, you need to be more specific about what is not working.

  • Which dictionary is used for spell check.

    Hi,
    I wanted to find out which dictionary is used for spell check? Is it Miriam Webster? My product manager and myself are curious.
    Regards.
    Ram.

    Hi Ram,
    Its ApEx Dictionary.
    Thanks
    Rana

  • How can I use SQL to check if the receipt is accounted?

    Dear all:
    How can I use SQL to check if the AR receipt is accounted ? Because there is so many receipts to check, I cannot open it to see the detail one by one.
    My environment is :11.5.9
    database : Oracle 9.2.0.8

    Duplicate post.
    How can I use SQL to check if the receipt is accounted?
    Re: How can I use SQL to check if the receipt is accounted?

  • What is going on? My password works here but when I used it to check about find my phone, it got complicated, put in answer to question, get email, etc.

    What is going on? My password works here but when I used it to check about find my iphone, it got complicated, put in answer to question, get email, etc.

    No, dude, if this guy can use it, so can most of his other neighbors. Let's point out a few things:
    1. This is very poor security, not to mention irresponsible of the neighbor to open his wireless to every person and pervert in his neighborhood!
    2. This guy still has NO control over who's using is, so of course bandwidth will be affected
    3. Until the neighbor locks it down to just 2 people, of course it will be slow
    Let's start using our brains before we have the poor guy start deleting plists, getting the apple broadband utility, rebuilding his O/S, reinstalling the combo updates and/or repairing permissions (good one!) .... he simply has NO control over the speed of that which he's using/stealing.
    Power Mac G5 Dual 2Ghz/iBook G4 1.42Ghz   Mac OS X (10.4.7)   2.5 Gig, Rad 9800 Pro 256M

  • HT1349 what app can i use to deposit checks into BOA?

    What app can I use to deposit checks into BOA?

    Thanks Johnathan, you're right. I checked with BoA today and they don't offer that app just yet, soon though.

Maybe you are looking for

  • How to open a new pop-up window on click of a link using OAFunctions

    Hi , I have a requirement to open a new pop-window on click of the responsibility name(functions available under responsibilities). The current URL /link is driven using OAFunctions. Any idea, how can i open a new window while still keeping the paren

  • How to Choose File format of Exported Clip

    I needed a clip from my movie for use in Live Type so I created Sub Clip from a longer duration clip and then exported it as QT movie. Or I thought I was doing that but the only choice of format I was given was .dv. How do you choose .mov or other fo

  • Can't find remove memory card option on my e71

    pls guys help me rectify dis, i can no longer see remove memory card option on my fone whenever i press d power key or thru memory card option in tools,, when i bought my e71, it'll always appear but it suddenly won't be there.. Pls help me as i alwa

  • Install new Test Qestion Items in TestAuthor (Authoring Environment)?

    Hi everyone! Does enybody know, is it possible to add new (external) test question types to the existing ones in test author (Authoring Environment). I would like to add some other question types eg.: -define order of possibilities; -choose the most

  • How to move FF settings/add ons/scripts/e.t.c. to win8?

    Hello Everyone, Just wish to ask the community at large if the following advice I received is totally correct? When I move over to Windows 8 in october I will be upgrading from Win7-Home Premium- currently 32bit Now my Dell Studio Laptop 1737 (2008-9