How to add Clientside validation?

  1. #1

    How to add Clientside validation?

    Hi,How do I check if the FormPanel is valid from the code behind? I noticed we can add listeners but I want to show an error message when the page is invalid and if it is valid, want to call a directevent. Can this be possible?


    Or if I can check whether the panel is valid or not in the direct event, I can show a message bx and return.


    Thank you
  2. #2

    RE: How to add Clientside validation?

    Hi,

    On server side you you have to check each control manually (there is no validation logic on the server side) or use ASP.NET validators


    You can check on client side and pass it to the server side as extra parameter of the DirectEvent
    <ext:Parameter Name="valid" Value="#{FormPanel1}.isValid()" Mode="Raw" />

    To show message box please use X.Msg class
    https://examples1.ext.net/#/MessageBox/Basic/Overview/


  3. #3

    RE: How to add Clientside validation?

    Thank you, I will try that.

Similar Threads

  1. FileUploadField.FileSize in clientside
    By kemalyigit in forum 1.x Help
    Replies: 1
    Last Post: Apr 24, 2012, 3:15 PM
  2. Replies: 8
    Last Post: Mar 27, 2012, 4:03 AM
  3. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM
  4. store filter clientside
    By Richardt in forum 1.x Help
    Replies: 2
    Last Post: Aug 13, 2010, 4:12 PM
  5. ClientSide to grouping gridpanel
    By stephan1985 in forum 1.x Help
    Replies: 1
    Last Post: Feb 22, 2010, 11:57 AM

Posting Permissions