- Posts: 32
- Thank you received: 0
Future date validation
- Andrew Davis
- Topic Author
- Offline
- Junior Member
-
Less
More
11 years 4 months ago #52707
by Andrew Davis
Future date validation was created by Andrew Davis
Hi.
One of the fields that we collect is the users licence expiry date.
In the date fields there is a validation rule for Past Dates "validate[required,custom[date],past[2014/11/18]]" which is good for date of birth, but what i need is a future date, and it needs to be future to NOW, not a given date.
Can this be done?
Cheers
Andrew
One of the fields that we collect is the users licence expiry date.
In the date fields there is a validation rule for Past Dates "validate[required,custom[date],past[2014/11/18]]" which is good for date of birth, but what i need is a future date, and it needs to be future to NOW, not a given date.
Can this be done?
Cheers
Andrew
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
11 years 4 months ago #52709
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Future date validation
Hi Andrew
According to jQuery validation engine documentation which we integrate in Events Booking, you can use this rule:
validate[required,custom[date],past[now]]
Please try that and it should work
Tuan
According to jQuery validation engine documentation which we integrate in Events Booking, you can use this rule:
validate[required,custom[date],past[now]]
Please try that and it should work
Tuan
Please Log in or Create an account to join the conversation.
- Andrew Davis
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 32
- Thank you received: 0
11 years 4 months ago - 11 years 4 months ago #52715
by Andrew Davis
Replied by Andrew Davis on topic Future date validation
Thanks for that Tuan (Great to see a developer who is so active in their own forum).
Just a quick note to any one else that comes across this,
if you want to validate that the date is sometime in the future (licence expiry date) then the correct validation is
validate[required,custom[date],future[now]]
I got this from www.position-absolute.com/articles/jquer...alidation-is-a-mess/ as i was looking for a list of jQuery validation engine possible codes.
Tuan may be able to give a better URL to see examples.
Cheers
Andrew
Just a quick note to any one else that comes across this,
if you want to validate that the date is sometime in the future (licence expiry date) then the correct validation is
validate[required,custom[date],future[now]]
I got this from www.position-absolute.com/articles/jquer...alidation-is-a-mess/ as i was looking for a list of jQuery validation engine possible codes.
Tuan may be able to give a better URL to see examples.
Cheers
Andrew
Last edit: 11 years 4 months ago by Andrew Davis.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
11 years 4 months ago #52719
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Future date validation
Ah, sorry Andrew. You are correct, the rule you write is correct in this case. The documentation with sample can be found at
posabsolute.github.io/jQuery-Validation-...other-element-s-name
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.