
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.