sh16 Posted December 4, 2016 Share Posted December 4, 2016 Hi everybody, we want to insert a field "birthday" in our client area in the customer data. This we have the following questions: We need to include three fields (day, month, year)? What kind of regex we need to insert? So that only numbers can be added? Best regards, sh16 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted December 4, 2016 Share Posted December 4, 2016 We need to include three fields (day, month, year)? one field will be enough if you have the right regex syntax What kind of regex we need to insert? So that only numbers can be added? the following will accept two date format (2012-10-23) and (2012/10/23): /^[0-9]{4}[-\/](0[1-9]|1[0-2])[-\/](0[1-9]|[1-2][0-9]|3[0-1])$/ 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.