Funky Town: Inline Field Validation


In this article, I look at another outrageous business requirement - Inline field validation.

Imagine typing in an email address, and as soon as you step off, the field turns red, and a tooltip style message appears, stating that your input does not meet the proper standard for an email address.

Inline field validation provides many benefits

1. Immediate help for the user
2. Affirmation that the user is doing the right thing
3. Assists complex data input requirements
4. Improves user experience
5. No server round trip required
6. Makes Siebel a joy to work with!

This is the sort of thing you see on fancy web forms, and only BA's will dream this requirement up because Siebel is a simple web application right?. Lets see how we can provide this functionality for them.


This solution will only work for form applets, so open up any form applet, and designate a field that will act as your "email address", for this exercise your field dosnt actually be an email field.

1. Put the following code in your email field control OnBlur handler

2. Add the following browser script to your applet
function validateEmail(applet,id){
        var sValue = applet.FindControl(id).GetValue();
        var oDoc = applet.FindActiveXControl(id).document;
   var oToolTip = oDoc.getElementById("Tooltip");
        if(sValue.length>0&&sValue.indexOf("@")==-1){//insert fancy email validation routine here
           var oToolTip=oDoc.createElement("div");
           oToolTip.innerHTML=" Please enter a valid Email address eg.";
 "10px 40px";
           var oHeader = oDoc.getElementById("SectionHeaderId");
           if(oHeader) {
                applet.FindControl(id).SetProperty("BgColor", "#ff0000");
                applet.FindControl(id).SetProperty("BgColor", "#ffffff");



3. Create a section header for your form, add the following in the caption override
<span id="SectionHeaderId">My Funky Form</span>

Re-compile your applet, and type in some junk in your email field. As soon as you step off, your field will turn red, and a message will appear to notify of the error.

Suffice to say, the email routine that I used above is not foolproof ^_*, but you get the idea. A more wholistic solution would look at validation from a general perspective, but that is left to the reader to run with.


1. Will it perform well?
Yes, there are no server calls.

2. Is it maintainable?
Yes, if the code is made production ready, and all the validation routines are centralised.

3. Can it be upgraded?
Yes, as it does not use any undocumented methods


4. Is it sexy?
Yes, its a BA's dream come true


  1. Browser scripts in Siebel it's Black Magic.
    It's sexy in the beginning but turns to nightmare after a while.
    Only reasonable using of BS is integration with local peripherals, but not for user checks.

  2. Any premature solution including server config, can become a nightmare after a while =)

    You may also find it interesting that Oracle recommends using browser script for client side validation

    Just be careful that you do not make expensive calls on commonly fired events, and employ a SME to tune your scripts.

    Further commentary is available on this subject on Jim Tanner-Uicker's Siebel blog, with contributions by two Oracle employees


Comments are open to all, please make it constructive.