Ideally, I think you'd want to create a mac field that works more like
a credit card validation field than a simple regex checker. I say
that because you could check the manufacturer prefix codes of the mac
addresses and verify that the suffixes match things they've produced,
and stuff like that. Maybe you couldn't do all of this yourself, but
if you get it started with a regex, and open source the code, others
would probably help.
I'm not sure if regexes are available in javascript, but I think you'd
want to validate this on the client side, or appear to, as well as
doing server-side validation.
2009/2/6 ARie <kap.tu...@googlemail.com>:
>
> Hi all,
>
> i am just trying to create my first django application an ran into a
> problem creating a field for a mac address.
> I am looking for something similar as django's built in
> IPAddressField.
> As a special mac-field is missing, ithought i could simply use a char-
> Field an validate it accordingly or i could use an RegExField, which
> is mentioned in the documentation.
> Unfortunately RexExFields don't seem to work within the admin form
> (for now all the data will be entered via the admin interface). At
--
Lee