TextField validation with multiple options

Hi.
I am trying to create a textField widget that can have a
number of possible correct answers. Can anyone let me know if this
is possible. I have successfully created a textField that validates
one answer with the use of Type Custom, but i am unsure how to have
multiple correct answers for one textField.
Thanks
Barry.

Hi Barry,
to validate more values inside the textfield widget, you have
to create your custom regular expression that fits with what values
you accept for that input field.
So your contructor should look similar with this:
var sprytextfield1 = new
Spry.Widget.ValidationTextField("sprytextfield1", "custom",
{regExpFilter:/test1|test2|test3/, useCharacterMasking:true});
This regexp is translated: the textfiled will accept only
test1, test2, test3 values.
You can also have this behavior if you create a custom
function having a set of switch values:
switch(){
case1: ...
case2:...
default:false
and you call this function as option in the widget
constructor.
Diana

Similar Messages

  • Duplicate keys and EO validation with deffered option selected

    Hi
    I'm using Jdev 11.1.1.3
    -I have a composite PK comprising of 3 fields - Jobcode,paycode,startdate on the same EO - these have primary property checked
    -row gets inserted the first time
    -when the same row is saved(testing validations) I somehow dont get the proper error message in my validations. I get the below line when a duplicate is entered.
    [oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".]
    any answers. searched the forums and looks like there are various posts but not the Duplicate issue which I'm facing.
    also:
    I'm using entity level validation methods with deffered option selected.
    please help?
    thanks

    Hi Dimitrios
    1. job,paycode,startdate and enddate have TxnEO validation (enddate can be blank, but if its entered it should be before the startdate + it has to be in future)
    2. 2 OTHER fields that are not mandatory but cannot be blank are done as 1 Entity level validation
    3. so 2 happens before 1, and all this works fine as it should
    4. there is also validation at the package API layer(db level) and on an insert, checks for row duplication based on the keys in 1(except enddate)
    5. both 1,2 have error messages are ADF error messages based on a reosurce bundle
    6. 4 hasa message that is sent back from the api layer that gets returned as null with the said message

  • Validating with multiple schemas

    I am setting the schama attribute as follow:
    String schemaSource = "C:\\Documents and Settings\\ayache\\My Documents\\C5 XML\\schema\\searhRequest.xsd";
                   String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
                   builderFactory.setAttribute(JAXP_SCHEMA_SOURCE, new File(schemaSource));searchRequest.xsd contains include statement: it referes to another schema. When i try to validate the xml document using the scheam above error is thrown stating that the elements that are defined in the second schema(BookingProfile.xsd) are not recognised or can't be resolved.
    Is there a way to set multiple schemas?
    Your help is much appreciated.

    I figured out my problem in case anyone else is having trouble..
    In the xml document that you need to refer to:
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance that is the namespace
    supported by xerces 1.3.1.
    Whew!
    "Karen Schaper" <[email protected]> wrote:
    >
    Has anyone been successful at validating xml with a Schema running weblogic
    6.1
    sp2?
    Here is a snippet of code...
    SAXParserFactory objFactory = SAXParserFactory.newInstance();
    objFactory.setValidating("true");
    objFactory.setNamespaceAware("true");
    objFactory.setFeature("http://apache.org/xml/features/validation/schema",
    "true");
    objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)),
    A_HANDLER);
    When my xml code runs through the parser I get an error for each element
    saying
    the element type is not declared in the dtd or schema.
    Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml
    validation
    with a Schema. From what I've read it seems that it does.
    Any help or insight would be appreciated.
    Thanks
    Karen

  • XML Validation with multiple XSD files (referenced)

    Hello,
    I know that XML validation with version 7.1 is possible now. However I was provided with a set of XSD files that have references to each other and need to be placed in a hierachical file system order so that references can be resolved.
    An element <xsl:include schemaLocation="../../baseSchemas/baseSchema.xsd" /> is used for example. How can I handle that for XSD validation in PI? Can I create the same folder structure or do I need to put all XSD files in one directory and change the import manually?
    But most important question: Is it possible it all to use more than one XSD for schema validation?

    Dear Florian,
    I had encountered such case in a project.
    I was given 3 files. One main file and 2 others called Schema1.xsd and Schema2.xsd.
    This happens because your data type is not in single namespace, but is being referred across namespaces and software components.
    I am assuming that you have read the How to Guide for XML validations on PI 7.1
    Best way to do this quickly is as follows.
    1. Enable XML validation at adapter engine in the sender agreement.
    2. Post a message using HTTP post. (http://sappihttpclient.codeplex.com)
    3. Check communication channel in runtime workbench. There will be an error saying which is missing at what path.
    4. Create the path mentioned and place the file at that path.
    5. Repeat steps 2,3,4 for all the files.
    When you are done with this, you will get a proper validation error in case XML file is not correct. And remember to generate XSD from message type and not data type.
    Regards,
    Vikas
    Edited by: Vikas Aggarwal on Sep 2, 2009 8:45 PM
    Edited by: Vikas Aggarwal on Sep 2, 2009 8:48 PM

  • Textfield validation with XML Data

    hello
    can i validation a textfield with data from a XML file?
    i will read eg usernames form an XML file and will check it
    with a username was typed in in a textfield,
    if the username exits the textfield is invalid, since the
    username was typed in, is not in the XML file.
    thanks
    jack

    Hello,
    I don't advise you to make such an scenario. The solution you
    propose involve some high security risks and privacy problems
    because you send to the browser a complete list of users of your
    website.
    The Spry Validation Textfield supports callback validation
    javascript function. This means you create your own function that
    include the necessary code to validate the user input and pass to
    the widget as parameter the name of your function. A good sample of
    this feature could be seen in the
    Password
    Validation section.
    Regards,
    Cristian

  • Recordsets with multiple options - AND, OR If Else and the "Any" Rule

    Hi,
    Been trying to get this to work for days now... I have a form with drop down lists that feeds through variables to a search page... The Recordset Jobsearch2 shown below works great so long as a user chooses and option that has info in the DB.... ie all fields must be present. I cannot seem to work out how to achieve and Any rule?...
    I have had 2 options suggested to me...
    a) the code below...
    if(isset($searchsector) && $searchsector !== "") {
    $query_jobsearch2 .= ' AND Sector LIKE "%' . mysql_real_escape_string($searchsector) . '%"';
    putting this in for each option..... but If Im told I have to add this in before the "$jobsearch2 = mysql_query" line... but when I do this the recordset disappears\is deleted...
    b) Using an Array and "Implode" -  this wouldbe great I'm sure if I had any clue how to do this and what it meant.
    MY CURRENT CODE
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    ?>
    <?php
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs WHERE jobs.Salary BETWEEN '$searchmin' AND '$searchmax' AND clocation = '$searchlocation' AND jobs.Sector  = '$searchsector' AND jobs.Type = '$searchtype'";
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    ?>
    Please help... ... pulling my hair out!
    Thanks

    Ok.. I've tried all methods and still not getting anywhere..
    David... following the link you gave me... and to the letter.. apart from GetSQLValueString()which does not seem to exist.
    All it does is return all the records (as per the basic recordset)
    Heres the code.... please please tell me where I am going wrong.... downloaded your book Foundation PHP but struggaling.,
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    $any = $_POST['any'];
    ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $expected = array('Sector' => 'text',
                      'clocation'         => 'text',
                      'minsalary'          => 'int',
                      'maxsalary'      => 'int');
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs";
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_search .= ' AND ';
          } else {
            $query_search .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_search .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_search .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_search .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    $queryString_jobsearch2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_jobsearch2") == false &&
            stristr($param, "totalRows_jobsearch2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_jobsearch2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_jobsearch2 = sprintf("&totalRows_jobsearch2=%d%s", $totalRows_jobsearch2, $queryString_jobsearch2);
    ?>

  • XSD validation with multiple namespaces

    Hi All,
    I'm trying to validate some XML using an XSD that contains multiple namespace schema descriptions, as such, the main XSD file must import an XSD for each namespace.
    The difficulty is that I cannot seem to find a way (in Oracle) to run a XSD validation using this (multi-XSD file) method.
    Has anyone out there tackled a similar problem?
    Cheers,
    Ben

    check out the class
    CL_XML_SCHEMA
    Regards
    Raja

  • Spry textfield validation with custom pattern

    I have sussed out the standard custom pattern, and how to
    enforce it,
    but what I would like to know is how can I allow any numbers,
    including
    spaces, brackets, or plus sign, but no letters?
    This is for a phone number entry field, where it could be an
    international phone number or a standard one for the UK,
    where the
    length can vary, depending on where you live.
    http://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Kingdom)
    Any ideas?
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

    V1 Fusion wrote:
    > Yes you can use regular expessions:
    >
    > function validatePhone(value){
    > return
    >
    /^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?
    >
    \d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3})
    > )?$/.test(value)
    > }
    >
    > var custom = new Spry.ValidationTextField(id, "custom",
    {validation:
    > validatePhone, validateOn:["blur", "change"]})
    >
    > regexp from
    http://regexlib.com/
    Excellent, thank you, that will get me in the right
    direction. Its not
    100%, but I think I can tinker with an expression to get what
    I want.
    The number is couldn't handle is +44 (0)113 255 7666 but its
    not an
    approved format anyway, but lots of companies still do it
    this way, so I
    want to ensure I get it right.
    Thanks again!
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Textfield validation with more than one format

    Hi,
    I've seen in the past a solution to validate a texfield with more than one format.
    Unfortunately, I can't find it back.
    I would like to validate the format of Dutch licencenumbers.
    There are several formats like:
    AA-12-34
    12-34-AA
    AA-12-AA
    AA-AA-12
    12-AA-AA
    12-AAA-0
    one of those formats must be right for validation.
    Can sombody give a hint how to do this validation?
    Regard,
    Jan

    Thank a lot!!
    I was just forgotten to end the separate groups with a dollar $ sign.
    many thanks
    Jan

  • Query with multiple outer joins

    I had a doubt with whether the following kind of query is valid with multiple outer-joins. The format of the query is something like this:-
    select A.col1, B.col2
    from table1 A, table2 B, table3 C where
    A.col3=B.col4(+) and B.col5=C.col6(+)
    This would mean the follwoing with regard to outer-joins in the query.
    1) fetch records with col3 in table A matching or not matching col4 in table B
    2) fetch records with col5 in table B matching or not matching col6 in table C
    So, this query is valid?
    I hope, my question is clear.
    Please, help in solving the doubt.
    regards

    This is valid and it works fine

  • Single hot corner, multiple options?

    Hi guys,
    I recently updated my iMac from app store's downloadable Mountain Lion (10.8.2).
    And I bought a Mac Pocket Book for learning about this new OS.
    Here's the thing confused me a lot.
    The author said these:
    Use the drop-down menus to set options for any corner you want. After that, when you move your mouse to that corner, your Mac fires up the screensaver (or does what you told it to—put the display to sleep, launch Mission Control, or whatever). The only downside of setting hot corners is that Apple gives you eight options for each corner, so unless you want to use a modifier key with the corner, you don’t have enough corners to use all the options.
    By using modifier keys (you can choose from Shift, ⌘, Option, and Control), you can get a single corner to do many different things. To add a modifier key to a hot corner, hold down the modifier key while you select what you want the hot corner to do from the Active Screen Corners window’s menus. Using modifiers with hot corners not only gives you extra flexibility, but it also prevents you from accidentally invoking the hot corner action when you’re mousing around.
    But I cannot set a single corner with multiple options! Could you guys can do that???

    I'm with you. I can get 10.8.2 to require a specific modifier key in a corner, but I cannot get multiple modifier keys to do different things in the same corner.
    However, the author is right that on the last point. It can help prevent unintended activation.

  • I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    This sounds like the age old problem with keychain & Safari. I don't know of a way to solve it without using something like 1Password.
    The iOS app has it's own built in browser, so it has more control over what gets autofilled. Safari on OS X has an 1Password extension that handles account selection & autofill etc.
    Keychain is great in principle, but it quickly falls down when you need tight integration with many ID's & different use cases (work, home etc).
    I'd suggest you submit feedback to Apple about your thoughts. I did so years ago about this issue & this is how far we have come (back to the point where me.com synced passwords) :^)
    http://apple.com/feedback/macosx.html
    Other tools like lastpass or keypassx may also help if you want to truly segregate password storage, but that doesn't fix autofill, the way around that issue is to dedicate one browser for work.

  • For the cm with multiple bps, what are the options for workaround?

    For the cm with multiple bps, what are the options for workaround?
    customer a purchases 1000
    and returns 800 at POS
    customer b was used at SAP related to  this transaction, purchase amounting to 2000,what can we do to apply the returns of customer a to customer b of 800 return transaction at pos?customer a and customer b code pertains to just one client---but were given different codes at POS and at SAP

    Hi,
    If one customer has two codes, you can only do manual journal entry to adjust their accounts.
    Thanks,
    Gordon

  • Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Profile is a folder which store all your personal data in a safe place
    * https://support.mozilla.com/en-US/kb/Profiles
    You can use this button to go to the current Firefox profile folder:
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    here explain how to backup profile
    * https://support.mozilla.com/en-US/kb/Backing%20up%20your%20information
    Here explain how to restore it
    *https://support.mozilla.com/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile

  • For some reason, my compression option is grayed out under "File" menu, and when I select a folder with multiple files, or multiple documents, and try to right-click or tap the mousepad with two fingers, I do not get a "compress" option available. Help.

    I don't know why, but when I select a folder with multiple docs contained within it, or multiple files, the Compress option is grayed out under the File menu, nor is it available when I right-click. Please help.

    Yes it is, but I have the same problem of the option does not appear with "right click" (I'm actually control-clicking), and COMPRESS is grayed out under the file menu. I'd like to fix it.
    Hmm. After finding the Archive Utility,* I tried archiving the folder. It came out as .cpgz, ugh. Found there was a preference to make .zip the default. It worked!
    And now…the menus are not grayed out. ?!?! OK.'
    Hope this helps someone.
    *You cannot find this via search, apparently it is a hidden file, you have to click from the root drive through to /System/Library/CoreServices (Thanks for the file path Alberto!)

Maybe you are looking for

  • How do I print two DIFFERENT A5 pages onto one A4 piece of paper in Preview?

    Hi, I know that within the Preview printing set up you can print two copies of one document on an A4 page. However, I want to print one copy each instead. I want to put about 8 photographs and documents onto 4 A4 pages all in A5 size to save on paper

  • Create PDF Document

    Using my Macbook Air, I would like to create a PDF document using text and images from Wikipedia.  On a Mac, I know how to save a webpage to PDF.  That is not what I am asking to do.  I want to do is this, go to Wikipedia and take a webpage and save

  • Error while registering essbase 11.1.1.2 with BPM architect

    hi i working on hyperion 11.1.1.2 when I am trying register essbase with epm "From Enterprise View, right-click the Analytic Servers node and select Register Analytic Servers with BPM Architect." I am getting error that says "No servers available to

  • Re STATUS Record-HR

    Hi, I have created FM for Hiring Action(HR) using BDC session, Inbound Process When i am trying to pass the FM to IDOC it is giving me Status Record 51 which specifies 'No status record was passed to ALE by the application', What exactly i have to do

  • Cannot boot OS X 10.4 from External Drive

    I have an external LaCie drive that has three partitions. I have 10.2.8 on one of the partitions, and I just installed 10.4 on another of the partitions. I am trying to boot from the partition with 10.4 on it, so I hold down "option" when the compute