Simple JavaScript Salesforce Validation - jSFValidation

Thursday, September 12, 2013 by Aslam - The Alexendra
Hi All,
Today I am going to give a demo for JS validation for VF pages which works mostly like native SFDC field validation. Here you can find the working demo.

http://labsprojects-developer-edition.ap1.force.com/jSFValidationDemo




Right now i have implemented the validation for "Required" type. If any text box values are empty , i am adding the error. You simply need to add the jSFValidation component and then you need to add the class "jSF_Required" on the fields you want to add validation for. In given demo, only "Mailing Country" is not required. Rest of the fields are marked for required.

You can download the code from here.
http://www.aslambari.com/downloads/jSFValidation.zip


Provide your suggestions to improve this :)

Thanks
Aslam Bari

12 comments:

Abdul Vahid said...

Nice :)

VIkas gaur said...

By using this we don't have to use standard error message.

urHelper said...

good one

visit this http://codebeautify.org/

Anonymous said...

you have done what i always thinking about, thanks!

Ganesh said...

I need code for this JSF validation..

Unknown said...
This comment has been removed by the author.
Unknown said...

http://axegahukar.blogspot.in/2014/08/how-to-add-validation-using-javascript.html

KKARTHIK said...

nice

Can Crusher said...

This is a really great blog post. thanks for sharing.

Anonymous said...

It appears zip file is not downloadable.

Padhma said...

this article was superb,but i expecting more information from this topic.but its useful
Back to original

tek pc solutions said...

Nice Post thanks for Sharing, Get instant technical help and support for printer, anti virus, email, desktop, laptop and more at 1-855-480-7873 toll free number.

Post a Comment