This topic is locked

Date validation with on client side with js

10/15/2010 7:48:39 PM
PHPRunner General questions
A
aalekizoglou author

Is it possible to add javascript validation on a date field, so that i validate the date entered to the current date for example?
I need to get dates entered equal to current or previous dates.
Thanks,

P
procheck 10/18/2010
A
aalekizoglou author 10/20/2010

Well, in fact that was not what i needed. I think somehow i could have a javascript to validate entered value, but then i should somehow show up the error and not let the system go away with the save button. In the manual there is a javascript example that someone could add a custome regexp validation into onloadjavascript event, but then i should have to generate a regexp to validate against dates. And i think regexp's are not for that reason.
So to re-phrase my question is there a way I can add a javascript onchange event on a date field, that if not validate it should show up a validation error and not let the save button work?

Admin 10/21/2010

You can add your own Javascript-based validation plugins.
Check 'How to add your own validation plugins' section at http://xlinesoft.com/phprunner/docs/validation_types.htm

A
aalekizoglou author 10/22/2010

<br />You can add your own Javascript-based validation plugins.<br /><br />Check 'How to add your own validation plugins' section at <a href='http://xlinesoft.com/phprunner/docs/validation_types.htm'; class='bbc_url' title='External link' rel='nofollow'>http://xlinesoft.com...ation_types.htm</a><br />

<br /><br /><br />
Thanks Sergey,
but I cannot add validation to date fields, therefore I cannot do that, at least in PHPR5.2
Any other ideas? Meanwhile do you plan to add custom validations in PHPR5.3 for date fields? I hope you can do this for all field types as well.

A
ann 10/22/2010

Athanasios,
thank you for pointing me to this bug.

We've fix if in the PHPRunner 5.3.
To make it work in 5.2 please open a ticket at http://support.xlinesoft.com and we'll send you JS file with fix.