
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
european-date-text-field
Advanced tools
This is a small gem/plugin for when you want to use a textfield to enter a European formatted date like DD/MM/YYYY, and validate to this format.
With this gem/plugin you can enter a european formatted date into your text_field.
When a correctly formatted date is passed it will be converted to a Date object and stored in the database as a date-field.
Otherwise the wrong value will be shown in the field an the database will contain nil.
Install the plugin into your Rails 3 application like this:
rails plugin install http://github.com/fousa/european-date-text-field.git
Next you should define the columns that need time conversion in your model object:
class Person < ActiveRecord::Base
european_date :birth_date
end
Then you have to change the name of your attributes in the form:
<%= f.text_field :european_birth_date %>
BE AWARE: You must add the european_ prefix at the beginning of your column names in order for the gem/plugin to work!
You can also use the supplied validator like this:
validates :european_birth_date, :european_date => true
Now the birth_date will be validated according to the DD/MM/Y ,DD/MM/YYYY, D/M/Y or DD/M/YYYY formats.
Make sure you use the column name with the european_ prefix, because it's this field we want to validate and not the database column!
Just ask here on Github!
FAQs
Unknown package
We found that european-date-text-field demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.