Skip to content

Instantly share code, notes, and snippets.

@bjpeterdelacruz
Created January 6, 2016 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjpeterdelacruz/fe4c390f3225735566ec to your computer and use it in GitHub Desktop.
Save bjpeterdelacruz/fe4c390f3225735566ec to your computer and use it in GitHub Desktop.
Replaces text inside a <p> tag
$(document).ready(
$('p.error').each(function() {
var text = $(this).text();
if (text.toLowerCase().indexOf("date field must be between") >= 0) {
$(this).empty();
$(this).text('The birth date must be prior to January 18, 1995.');
}
});
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment