i need a regular expression for just year like 1988.....
this is the year code
Code:<select name="YearEstablished">
<option value="">yyyy</option>
<?php
for ($i=2005; $i>=1900; $i--)
{
echo "<option value='$i'";
if ($fields["YearEstablished"] == $i)
echo " selected";
echo ">$i</option>";
}
?>
</select>
here is the regular expressions am using
Code:$rules[] = "required,YearEstablished,Please enter a xxxxxxxxxxxxxxxxxx.";
$rules[] = "reg_exp,YearEstablished,^[0-9{4}],YearEstablished: XXXXXXXXX (Valid: a-z 0-9 space and dash.)";
here is my error
YearEstablished: Invalid charachters detected. (Valid: a-z 0-9 space and dash.)