280 total views, 2 views today
ADF Client side validation – Email validation
ADF supports both server side and client side validation. Server side validation is where we write the validation code on the Java class, so when a user input data in the JSF page, the value will send to the server for validation and the server response back with the output. So a client – server call back will happen whenever a validation occurs.
In ADF client side validation we write the validation code on the JSF page, so when a user input data on the page, the JSF page validates the data and respond back. There is no request and response to & from the server, and it is very fast compared to the server side validation. Most of the time we try to put the validation logic in Client side for better performance.
In this section, I have described how to create a client side validation using the regular expression. I have a form in my the JSF page with an email field. Whenever user inputs an invalid email and moves out from the field, JSF throws an error message
Open the JSF page which has email field >> Search for regular expression in components >> Drag and drop the Validate Regular Expression to the Email field as shown below
Click the Source tab of the JSF page >>Comment out the existing validator >> Select the ValidateRegExt tag >> click the tab Validate Regular Expression on the right side
Input a regular expression in the pattern >> Error message in the MessageDetailNoMatch as shown below >> Click Save
Message: You have entered an invalid email address. Please try again.
Test the Project
Deploy the project in WebLogic. Input an invalid email in the Email field and mouse over from it. An error message will get displayed as shown below
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017