Validation of a Date Field

  • Didier Jean Pierre
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 3 weeks ago #165039 by Didier Jean Pierre
Validation of a Date Field was created by Didier Jean Pierre
We have several plans to which users subscribe and one field we use is a date field called Date of Birth.  What I need to do is validate that field so that the age of the person is at least 18 years old.  Has anyone done this before and can share some coding ideas with me or can I be directed as to what i need to do . I am happy with writing PHP stuff

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #165041 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Validation of a Date Field
Hi Didier

Try to edit the field, set Server Validation Rules to age:18 and it should work as you want

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Mr Leslie Jarrett
  • Offline
  • Junior Member
  • Junior Member
More
1 month 3 weeks ago #165042 by Mr Leslie Jarrett
Replied by Mr Leslie Jarrett on topic Validation of a Date Field
I am helping the user can you show me the syntax line to validate age:18 i just put that in and it did not work

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #165043 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Validation of a Date Field
Hello

Please submit a support ticket sending us super user account of your site and link to registration page, tell me ID of the custom field which needs this validation

I will check and configure it for you

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Mr Leslie Jarrett
  • Offline
  • Junior Member
  • Junior Member
More
1 month 3 weeks ago #165044 by Mr Leslie Jarrett
Replied by Mr Leslie Jarrett on topic Validation of a Date Field
it is testing on a localhost by me but the field name is individual_date_of_birth type Date

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #165045 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Validation of a Date Field
Hello

As mentioned, please edit the custom field, set Server Validation Rules to age:18, set Validation Error Message to the message you want such as you need to be 18 years or older to perform registration, then test to see if it works

See the attached screenshot for the setting I am talking about

Regards,

Tuan
Attachments:

Please Log in or Create an account to join the conversation.

  • Mr Leslie Jarrett
  • Offline
  • Junior Member
  • Junior Member
More
1 month 3 weeks ago #165054 by Mr Leslie Jarrett
Replied by Mr Leslie Jarrett on topic Validation of a Date Field
Thanks it works Now !!!!

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #165055 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Validation of a Date Field
Great. Thanks for confirming

Tuan

Please Log in or Create an account to join the conversation.