How to Validate Email field & Other..

Hi,
1. I have a requirement in which I have to check that the texinput field i.e EMail field should have @ in it. If not then I need to throw exception.
Can anybody tell me how to check @ from VO attribute.
2. There is another text input field in which I have to check that the input value by user should not be less than 0 and greater than 15. -- Not solved Yet
I will do these validation on submit button.
Please help.
Thanks in advance.
Ajay
Edited by: Ajay Sharma on Apr 29, 2009 6:07 AM
Edited by: Ajay Sharma on Apr 29, 2009 8:28 PM
Edited by: Ajay Sharma on Apr 29, 2009 8:29 PM

Hi,
I am trying with this...
public boolean validateFormat(String Item)
boolean isAlphanumeric = false;
Number number = null;
if(Item != null && !"".equals(Item))
try
number = new Number(Item);
catch(SQLException sqlexception)
{System.out.println("Error in conversion"); }
if(( number < 0) && (number > 11))
isAlphanumeric = true;
return isAlphanumeric;
But I am getting error while compiling
Error(332,21): method <(oracle.jbo.domain.Number, int) not found in class exl.oracle.apps.per.eexit.server.EmployeeAMImpl
Error(332,37): method >(oracle.jbo.domain.Number, int) not found in class exl.oracle.apps.per.eexit.server.EmployeeAMImpl
Thanks
Ajay

Similar Messages

  • How to validate the field when i am populating the data cursor to block

    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.

    902434 wrote:
    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
    If :quentity <0 then
    message('do not enter negative value');
    message('do not enter negative value');
    raise form_trigger_failure;
    end if;Why u open same thread again ? not closing one.. check this one
    </a>
    How to validate the field when i am populating the data cursor to block
    Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • How to validate input fields as the user is filling up a form with jQuery?

    Hello EA friends.
    Someone has experimented on how to validate input fields as the user is filling up a form with jQuery?, if the field is numeric and insert an A for example, an alert appears showing "insert a number" or not allowed to enter anything until a number is entered.
    Thanks and regards.
    Fer

    Hi Sudeshna.
    Sorry for not responding on time, how can I be included in this code?
    sym.setVariable("typeActivity", "input")
    var Element_1=document.createElement(typeActivity);
    $(Element_1).css({"text-align": "center"});
    //Answer
    sym.setVariable("Answer_1", "4");
    sym.$("box_1").append(Element_1)
    This code is on my creationComplete and it works fine.
    Would greatly appreciate your help.
    Regards.
    Fer García

  • How to validate the fields  and how to display the error messagein presenta

    Hi,
    I am new to OBPM 10g, pls tell me how to validate the fields in a presentation.
    for example if we take login presentation if user enters his user name and password wrongle and submit the form. Then we need to display error message right side of the each field i.e user name and passowrd is wrong and try again.
    Regards
    jaya
    Edited by: 12345 on Aug 12, 2010 10:38 PM

    Hi Jaya,
    You can initially set the validation for empty values.. that is when the user dint enters any value and clicks on submit.
    for these vadliations you need to write a method and call it on submit button click!!
    secondly, you can validate for the format if required.
    thirdly, you can validate against a database for the credentials. For this you need to fetch list of usernames from database and search for user entered value in that list.
    Optimal query would be : if user name not null, query for pwd of the entered user name from database or file storage. if you dont get any value for pwd of given username, its incorrect user name. if you get some pwd value for username, then check against the one user entered in pwd field..
    Write all this logic in a method and call on submit button click event of the login form!!
    HTH
    Sharma

  • How to validate ch field in selection screen

    hi experts.......
    how to validate ch field selection screen......... and which function module is used to validate parameter field i.e character

    Hello,
                Is your requirement to Validate the Character Field? This is what I understand. If it is right, then do you want to Validate whether a Character Value is entered?
                Check the below Sample Code.
    At Selection-Screen on P_CHARFIELD.
        IF P_CHARFIELD CA '1234567890'.
            Message 'Enter an Alpha Character only' Type 'E'.
        Endif.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to validate Email Address in HTML DB Application

    Hi,
    I have delevoped one Employee Login Details form in HTML DB. But i am unable to validate that email address as i find html db is not supporting String functions like indexOf(char c), substring(int) ect. So please can anybody help me to know how to validate email address that it has @ and . symbol or not.
    Thanks in advance.

    user529382,
    You may be able to use Regular Expressions instead, if you do a search in this forum for 'regex' you should find a few hits.
    While I agree that using a regular expression is a great way to verify that the user has entered an email address that conforms to the regular expression rules, it is still nothing more than that....conforming to the regular express rules.
    The only way to 100% confirm that an email address is 'valid', is to actually send an email to it, so what I tend to do is to get the user to enter their email twice (in a user registration screen for example), that way you can minimize the chance of 'typos', then send out a 'verification email' that the user has to click a link on to verify they have received it (I'm sure you've seen this type of system before), only when the confirmation is received would I then make the account 'active'.
    Hope this helps.

  • How to validate Quantity field in TV - Inputfield ?

    Hello All,
            I'm using a table view to show the output .
    IN this table view I made 2 fields as Input fields.
    Both the fields are Quantity fields.
    Now when the user enters a value in this Quantity field I want to validate it with respect to it's units .
    How can I do that ?
    In my case if the user enters correct value it works but when he enters a wrong value my BSP is going for a dump.
    I tried to debug the<b> LIPS table</b> to verify how SAP was handling this checking for the field <b>LFIMG</b>. But there there is a statement called chain --endchain.
    SO there is no chance for debugging.
    My code is as follows :-
            LOOP AT gt_final INTO wa_final.
              CLEAR: gv_row,lv_qty,lv_string,gv_len,gv_cell_id1.
              gv_row = sy-tabix.
              gv_len = STRLEN( gv_row ).
              gv_len = gv_len - 1.
    * Modify the Third Column
              CONCATENATE 'INB01_TV_ID' '_' gv_row(gv_len) '_' '3' INTO gv_cell_id1 .
              lv_string = request->get_form_field( name = gv_cell_id1 ).
              WRITE lv_string TO lv_qty  UNIT wa_final-units.
              CLEAR :wa_final-del_quantity.
              wa_final-del_quantity = lv_qty.
              MODIFY gt_final FROM wa_final TRANSPORTING del_quantity.
            ENDLOOP.
    Can anyone tell me how to validate the entry for the Quantity filed ?
    Regards,
    Deepu.K
    I have one more Question .
    Whenever BSP goes for a dump in this case I want to handle this by a message .
    Is it possible ?
    Message was edited by:
            deepu k

    Hello Raja,
           I want to validate the entry in the QUantity field with respect to the Unit of the Quantity.
    I.e say for example I have a unit as PC (pieces) then the quantity must be only of thousands,lakks and so..on......but not in points i.e a piece quantity must be full either 200 ,2 lakhs or 2 pieces but not 2.5 pieces.
    SO now if the user enters 2.5 it's a wrong value as the quantity for the Unit PIECES can't have half-piece. (2.5 = 2 + 0.5) .SO i want to validate this .
    I hope I'm clear.
    How should I do ?
    Regards,
    Deepu.k

  • How to validate the field values in module pool program?

    Hi Guys
         I am working with module pool programming.
         Here I want to validate the fields like below.
         with out filling all the fields if I click SAVE option it has to show a message that all fields has to be filled.  This can be done by checking all the fields individually.
         I think it can be done through <b>LOOP AT SCREEN ......ENDLOOP</b>. sequence.
         If it is possible, can anyone help me?

    You need to write the Module in between the CHAIN and ENDCHAIN statment in SE51
    If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1>.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2>.
    ENDCHAIN.
    all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.
    Look at the DEMO program DEMO_DYNPRO_FIELD_CHAIN.
    ashish

  • How to validate a field of type text for similar values

    Hi,
    My requirement is to validate a field <b>Name1</b> of type Text[40] for similar values when a new record is created. So If the Name1 already exist in repository, the validation has to give warning message saying the customer with Name1 already exist.
    Regards,
    Madhu

    Hi Madhu
    To validate a particular field, when a new record comes along with the same value SAP MDM is not capable of generating warning messages, but we can have best method of Tracking at Import manager level.
    In the Import manager after successful mapping, access the MATCH RECORD tab. Go to the Default import action area there you can find Match type & Default import action. For example if you are sending same Material record which is already available in the Repository, Match type will have the value “EXACT” where as Default Import action will have “UPDATE (ALL MAPPED FIELDS or NULL FIELDS)”.
    Here I have copied various Match types as well as Default Import Actions along with the definitions, pls go thru the same and feel free to revert to me for further clarifications.
    <u><b>Default Import Action</b></u>
    <b>Skip -></b> Skip source value combinations that already
            exist.
    <b>Update(NULL Qualifiers Only) -></b>     Update just the NULL remaining qualifiers of each existing qualified lookup value.
    <b>Update (All Mapped Qualifiers)-></b> Update all the remaining qualifiers of each existing
    qualified lookup value.
    <b>Replace -></b> Replace all the remaining qualifiers of each existing qualified lookup value by first deleting them and then creating a new value combination.
    <b>Delete -></b> Delete this qualified lookup value during import Processing.
    <u><b>Match Type</b></u>
    <b>None -></b> None
    <b>Exact -> </b> Whether the match type for the destination record with the current source
    record is Exact.
    <b>Partial -></b> Whether the match type for the destination record with the current source
    record is Partial.
    <b>Conflict -></b> Whether the match type for the destination record with the current source
    record is Conflict.
    Thanks
    Alexander
    Message was edited by: Alexander Raja

  • How to validate input fields in a popup?

    Hi guys,
    i have a popup containing some input fields which i have to validate before closing the popup (if the validation fails, the popup should stay opened and print some error messages).
    But since my view (inside the popup) doesn't has any events, because i use the popup buttons like recommended in other postings, i don't know where to apply the validation.
    Any tips are very welcome.
    Best regards
    Philipp

    Thanks for the tip!
    I think you mean something like
      lr_view_controller = wd_this->wd_get_api( ).
      lo_window->subscribe_to_button_event(
      button = if_wd_window=>co_button_ok
      button_text = 'Person anlegen'
      action_name = 'PERFORMCREATE_PERS'
      action_view = lr_view_controller ).
    But this binds methods of the "parent" (in my case the MAIN view) to the button, which gets applied after the view got closed!?
    How can i bind methods IN the called popup view and perfom them BEFORE the close.
    I'm sorry if i don't see obvious things.
    Best regards
    Philipp

  • How to validate array fields in struts

    hi
    iam working on struts. i have array fields in my jsp page. i wanna do validations for those fields. iam specifying name of the field in the validation.xml. but iam not getting correct validations. how can i have proceed in the case of array fields.
    plzz help me
    vamsi

    hi thank you for your help
    iam using the same syntax only. but iam not getting iam sending my jsp and xml files
    <body>
    <logic:messagesPresent>
    <font color="red"><b>
    <html:messages id="error">
    <li><%=error %></li>
    </html:messages>
    </b></font>
    </logic:messagesPresent>
    <html:form action="/wofinal" onsubmit="return validateWofinalForm(this)">
    <% System.out.println("true"); %>
    <p align="center"><font size="5" color="#0000FF">
      Work Order Release</font>
      <p align="center"> </p>
      <table border="1" width="70%" align=center>
        <tr>
          <td width="50%">
            <p align="right"><b><font color="#990000">Select Work Order Number</font> </b>   
          </td>
      <td width="50%" align=left>
      <%
         String worder_no=(String)session.getAttribute("worder_no");
          String selected=(String)session.getAttribute("selected");
      %>
         <%= worder_no %>
         <html:hidden property="worder_no" value="<%= worder_no %>" ></html:hidden>
      </td>
      </tr>
      <tr>
          <td width="50%">
            <p align="right">        <b><font color="#990000">Number
            of Candidates Got Selected </font></b>    
          </td>
          <td width="50%">
            <%= selected %>
             <html:hidden property="selected" value="1"></html:hidden>
      </tr>
      <tr>
           <td width="50%" align="right"><b><font color="#990000">Remarks</font></b>   </td>
           <td width="50%"><html:text maxlength="300" property="remarks" size="50"></html:text>
      </tr>
      </table>
      <p> </p>
      <table border="1" width="90%" height="44" align="center">
        <tr>
          <td width="5%" valign="middle" align="center" height="38">
            <p align="center"><b><font color="#990000" >S.No</font></b></p></td>
          <td width="16%" valign="middle" align="center" height="38"><b><font color="#990000">Name</font></b></td>
           <td width="16%" valign="middle" align="center" height="38"><b><font color="#990000">Qualification</font></b></td>
          <td width="12%" valign="middle" align="center" height="38"><b><font color="#990000">Date of
            Commencement</font></b></td>
          <td width="12%" valign="middle" align="center" height="38"><b><font color="#990000">Date of
            Completion</font></b></td>
          <td width="10%" valign="middle" align="center" height="38"><b><font color="#990000">Rate per MM</font></b></td>
          <td width="5%" valign="middle" align="center" height="38"><b><font color="#990000">No. of MMs</font></b></td>
        </tr>
            [u]  Here iam getting problem in the validation of below fields[/u]
         <% int count=Integer.parseInt(selected); %>
         <% for(int i=1;i<=count;i++) {
            String st=""+i;
         %>
          <tr>
          <td width="5%"  align="center" height="38"><html:text property="sno" value="<%= st %>" onfocus="this.blur()" maxlength="2" size="2"/></td>
          <td width="17%" valign="middle" align="center" height="38"><html:text property="name" value="" ></html:text></td>
          <td width="10%" valign="middle" align="center" height="38"><html:text property="qual" value="" size="20"></html:text></td>
         <td width="10%" valign="middle" align="center" height="38"><html:text property="comm"  value="" maxlength="10" size="15"></html:text></td>
          <td width="10%" valign="middle" align="center" height="38"><html:text property="comple" value="" maxlength="10" size="15"></html:text></td>
          <td width="10%" valign="middle" align="center" height="38"><html:text property="rpm" value="" size="10"></html:text></td>
          <td width="7%" valign="middle" align="center" height="38"><html:text property="mm" value="" maxlength="3" size="5"></html:text></td>
          </tr>
         <% } %>
         </table>
          <p align=center><html:submit/></p>
      </html:form>
      </body>
    </html:html>[b]and my struts-config file is
        <form-beans>
              <form-bean name="wofinalForm"
                   type="bean.WOfinalForm" >
                </form-bean>
       </form-beans>
       <action-mappings>
            <action path="/wofinal"
                    type="bean.WOfinalAction"
                    name="wofinalForm"
                    scope="request"
                        validate="true"
                        input="/worder_final.jsp">
                      <forward name="SUCCESS" path="/index.jsp" redirect="true"/>
                    <forward name="FAILURE" path="/worder_rel.jsp" redirect="true" /> 
           </action>            
       </action-mappings>
    and my validation.xml file is
    <formset>
              <form name="wofinalForm">
                   <field property="name"
                           depends="required">
                             <arg key="finalform.name" />
                    </field>
                    <field property="comm"
                           depends="required,date">
                             <arg key="finalform.comm"/>
                             <arg1 key="${var:datePattern}"
                                   name="datePattern" resource="false" />
                             <var>
                                 <var-name>datePattern</var-name>
                                  <var-value>dd/mm/yyyy</var-value>
                             </var>
                    </field>
                    <field property="rpm"
                           depends="required,integer">
                           <arg0 key="finalform.rpm"/>
                             <arg0 key="finalform.rpm" />
                    </field>
                    <field property="mm"
                           depends="required,integer">
                           <arg0 key="finalform.mm"/>
                             <arg1 key="finalform.mm" />
                    </field>
              </form>
    </formset>in the jsp page iam using loop to display fields
    in the validations of those fields iam getting error.
    plzz help me.
    vamsi

  • How to validate required fields before executing menu item ("Save As") using cutom Javascript?

    Hi,
    Sorry, I am new to PDF Development. I tried creating PDF using Acrobat XI Pro. During creation, I have encountered issues in running custom JavaScript. The requirement is to validate all the required fields before saving the PDF. I tried using the following scripts to validate the said required fields. But, it's not working.
    Option 1: If the field is null, a message box will appear.
    if(this.getfield("textbox") = null){
    app.alert("required");
    else {app.execMenuItem("SaveAs");}
    Option 2: If the field is required, a message box will appear.
    var f = this.getField("textbox");
    f.required = true;
    if(f = true)
    app.alert('required');
    else
    app.execMenuItem("SaveAs");
    The scripts mentioned above are not working. I wanted to validate the required fields before saving the PDF.
    In addition, I tried validating each field using the following script:
    f = getField(event.target.name)
    if (f.value.length == 0)
        f.setFocus()
        //Optional Message - Comment out the next line to remove
        app.alert("This field is required. Please enter a value.")
    When I open the PDF, the script is working. However, when the message box pops out, the "OK" button is not working as expected. The message box is not closing. I tried opening the form in a site in different Java versions (like 7-11 and 7-67). It's working in version 7-67. I tried upgrading the Java version from 7-11 to 7-67. Still, it doesn't work.
    I would appreciate your feedback on this matter.

    If you set the fields as required, then when the user hits the print button you could run this script:
    var txt = form1.execValidate();
    if (txt == true){
    print command
    This code assumes that the root node of your form is form1. Also ensure you put a message into the Empty Message parameter for each field that you want to mark s required.

  • How to validate date fields in the flash form

    i want to validate the date fields to make sure the values
    are not greater than today's date and from-date is less than or
    equal to to-date in the flash form. Does the actionscript have a CF
    DateDiff function for the validatation?
    Thanks

    I finally (after much reading up on actionscript) figured out
    my problem with date validation...which was similar to yours...
    I posted the solution I found for my AS date validation issue
    here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=22&threadid=1232361
    I hope it helps!!!

  • How to validate editable field in ALV

    Hi All,
    I have a alv program using OOPS concept where two fields(columns) are editable in the alv output. These two columns contain table names and field names which can be edited.
    I just want to validate these table and field names when we press the save button. If the edited entry is valid,i.e., the tablename is existing in the database, then it must update the entered value oftbl name to the db. else it shud give a error msg.
    Please help with this code.
    Thanks in Advance.

    Hey!!!
    Try using this...
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS : handle_data_changed FOR EVENT data_changed
                                      OF  cl_gui_alv_grid
                                      IMPORTING er_data_changed.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        PERFORM data_changed USING er_data_changed.
      ENDMETHOD.   
    ENDCLASS.
    form DATA_CHANGED  using p_er_data_changed
                             TYPE REF TO cl_alv_changed_data_protocol.
      DATA : ls_mod_cells TYPE lvc_s_modi,
                   declare a variable for your table or field name.
      LOOP AT p_er_data_changed->mt_good_cells INTO ls_mod_cells.
          CASE ls_mod_cells-fieldname.
          WHEN 'LIFNR'.
              CALL METHOD p_er_data_changed->get_cell_value
              EXPORTING
                i_row_id    = ls_mod_cells-row_id
                i_fieldname = 'LIFNR'
              IMPORTING
                e_value     = The variable you have defined.
    put ur condition according to variable here, if the condition is not satisfied, then throw a message like this.
            CALL METHOD p_er_data_changed->add_protocol_entry
                EXPORTING
                  i_msgid     = 'ZFI'
                  i_msgno     = '999'
                  i_msgty     = 'E'
                  i_msgv1     = 'Employee Number Doesn''t Exist'
                  i_fieldname = ls_mod_cells-fieldname
                  i_row_id    = ls_mod_cells-row_id.
              EXIT.
            ENDIF.
    Hope this helps.
    Regrds,
    Abhinab Mishra

  • How to validate a field in Asset master?

    Hi,
    I have requirement like need to validate field ANLA-TYPBZ,
    Data uniquely passing to this field, i need to check whether data already exist or not while creating asset master using AS01 transaction.
    eg: suppose ANLA-TYPBZ = 12345' entry is there in the table, if i tried to post the data using AS01 as '12345', it should give error message.
    Thanks.

    hi,
    Follow the below steps:
    1. create a validation in GGB0 at node Assets - > Master Data
    2. create a routine in program where these validations were written. It is a copy from RGGBR000
    3. activate validation: append a record in transaction OACV
    http://wiki.sdn.sap.com/wiki/display/ERPFI/Validations
    Regards
    Alok
    Edited by: alpatr on Nov 21, 2011 8:12 AM

Maybe you are looking for

  • Can no longer purchase itunes songs on original computer and ipod but...

    Hello, Originally, I had a iPod nano with video..do not have generation at hand..and used it at iTunes with no issues for music and podcasts. My purchases and downloads worked fine via my authorized computer.  Mid to late summer, I received an iPod t

  • Airport Extreme Hard Drive + Printer

    Hello, When I was reading through the Airport Extreme features on the Apple site, it says that the Extreme supports both a Printer and an external Hard Drive connected to it via a USB hub. When I launched Airport Utility to see if the HD and Printer

  • 6233 V5.10 Version Should be available on NSU.

    If it is available on Nokia service centre then y should not on the NSU? It should b released on Nokia server earlier than on Service centres due to development scheme and procedure of software manufacturing. Nothing logical first at NSC then NSU.

  • Adobe CS6 Master Volume Lic will be activate again

    Sorry for my bad english I've been using Adobe Application Manager Enterprise Edition 2.1 to create a package to distribute to CS6 Master Collection and distributed by GPO to clients. The whole thing was about 3 months ago. It worked flawlessly every

  • Connection rejected, the server is in a running state.

    Have deployed webservice within weblogic. WLS starts up fine. Users can access the webserver, after a period of time, webservice hangs up and users that try to connect recieve this following message, I also see this in the weblogic.log The server is