I hereby claim:
- I am intelekshual on github.
- I am intelekshual (https://keybase.io/intelekshual) on keybase.
- I have a public key ASAGnc0x6itbdq_FmpLPXKQmJD7-8skP3fhcnwx9wYqsTQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function getElementsByAttribute(tag, name, value) { | |
var elements = (tag == "*" && document.all) ? document.all : document.getElementsByTagName(tag), | |
matches = [], | |
re = (typeof name !== "undefined") ? new RegExp("(^|\\s)" + value + "(\\s|$)", "i") : null, | |
current, | |
attribute; | |
for (var i = 0; i < elements.length; i++) { | |
current = elements[i]; | |
attribute = current.getAttribute && current.getAttribute(name); |
class ExpirationDateValidator < ActiveModel::EachValidator | |
def validate_each(object, attribute, value) | |
expiration_date, today = value, Date.today | |
if today.year > expiration_date.year || today.month > expiration_date.month | |
object.errors[attribute] << (options[:message] || "is not valid") | |
end | |
end | |
end |