Hi,
Thanks for the code. It helped me out a lot. But I noticed that it
doesn't work if they don't enter a fax number, so I changed it to:
if ( $data->{domain} =~ /\.info/ ) { #ST Mod to validate phone
format for .info
if ( $data->{"${type}_phone"} !~
/^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ )
{
# do something to tell the registrant about the bad phone number
$problem_fields{"$contact_types{$type} Phone"} =
$data->{"${type}_phone"} . " - ERROR - Format must be +1.4165551212";
}
if ( $data->{"${type}_fax"} ne '') {
if ( $data->{"${type}_fax"} !~ /^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ )
{
# do something to tell the registrant about the bad phone number
$problem_fields{"$contact_types{$type} Fax"} =
$data->{"${type}_fax"} . " - ERROR - Format must be +1.4165551212";
}
}
} else {
unless (OpenSRS::Syntax::PhoneSyntax($data->{"${type}_phone"})) {
$problem_fields{"$contact_types{$type} Phone"} =
$data->{"${type}_phone"} . " - ERROR";
}
}
Now I'm no expert coder, so this code may not be ideal, but it works.
Does anyone have a simliar mod to validate that .info registrations meet
the two year minimum?
ST
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jim Carey
Sent: Saturday, September 29, 2001 2:12 PM
To: erol M
Cc: Discuss-List@Opensrs. Org
Subject: RE: OpenSRS Live Reseller Update 09/27/01
excellent erol - works a treat - and lots simpler than my way :-)
cheers
Jim Carey
www.OZbcoz.com discount domain registration
www.iluvoz.com affordable hosting services
> -----Original Message-----
> From: erol M [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 30 September 2001 6:38 AM
> To: Jim Carey
> Cc: [EMAIL PROTECTED]; Discuss-List@Opensrs. Org
> Subject: RE: OpenSRS Live Reseller Update 09/27/01
>
>
> try this, not too sure how good it is ( or if it will work ), but give
it
> a whirl:
>
> ess (OpenSRS::Syntax::PhoneSyntax($data->{"${type}_phone"})) {
> $problem_fields{"$contact_types{$type} Phone"} =
> $data->{"${type}_phone"} . " - ERROR";
> }
>
> with
>
> if ( $data->{domain} =~ /\.info/ ) {
> if ( $data->{"${type}_phone"} !~
/^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ )
> {
> # do something to tell the registrant about the bad phone
number
> $problem_fields{"$contact_types{$type} Phone"} =
> $data->{"${type}_phone"} . " - ERROR - Format must be +1.4165551212";
> }
> if ( $data->{"${type}_fax"} !~
/^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ ) {
> # do something to tell the registrant about the bad phone
number
> $problem_fields{"$contact_types{$type} Fax"} =
> $data->{"${type}_fax"} . " - ERROR - Format must be +1.4165551212";
> }
> } else {
> unless (OpenSRS::Syntax::PhoneSyntax($data->{"${type}_phone"})) {
> $problem_fields{"$contact_types{$type} Phone"} =
> $data->{"${type}_phone"} . " - ERROR";
> }
> }
>
>
>
> On Sat, 29 Sep 2001, Jim Carey wrote:
>
> > does anyone have any more specific guidelines on the changes
> necessary to
> > OpenSRS::XML_Client::validate() to help a perl dummy get ready
> for .info.
> >
> > As far as I can see I would have to go within the :
> >
> > foreach $domain (@domains) {
> > if ($syntaxError = check_domain_syntax($domain)) {
> > $problem_fields{Domain} = $domain . " - " . $syntaxError;
> > }
> >
> > block (in case I have multiple domains being registered) and
> have another
> > block that runs through the owner,billing and tech phone numbers and
fax
> > numbers - similar to the blocks above it in the code?
> >
> > is that correct ?
> >
> > or is it simpler to update reg_system.cgi ?
> >
> > cheers
> >
> > Jim Carey
> > www.OZbcoz.com discount domain registration
> > www.iluvoz.com affordable hosting services
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> > > Sent: Friday, 28 September 2001 11:00 AM
> > > To: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]
> > > Subject: RE: OpenSRS Live Reseller Update 09/27/01
> > >
> > >
> > > Eric:
> > >
> > > Yes, you are correct. My appologies. Forgot my e-mail reader is
> > > not my code
> > > editor. :(
> > >
> > > Rich Shockney
> > > -- Gone to clean glasses and computer screen.
> > >
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, September 27, 2001 6:59 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: OpenSRS Live Reseller Update 09/27/01
> > >
> > >
> > > Rich:
> > >
> > > I don't see a space required in the regex. the last numbers
> min 1 max 12
> > > followed by x(1 to 4 numbers) There is no space that I can see.
> > > You must
> > > be looking at it with a font that makes it look like a space. If
you
> > > highlight copy and paste, and put your cursor there, you will
> see there is
> > > no space.
> > >
> > > Eric
> > >
> > > At 06:16 PM 9/27/01 -0500, you wrote:
> > > >This is the regexp to validate the phone number for .info:
> > > >
> > > > if ( $phone !~ /^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ ) {
> > > > # do something to tell the registrant about
> the bad phone
> > > >number
> > > > # return "phone number has to be in a
> +1.4165551122x1234
> > > >format.\n";
> > > > }
> > > >
> > > >The regex indicates that the required format is:
> > > >+123.123456789012 x1234 (space required for an extension)
> > > >
> > > >But your returned error message indicates that the required
> format is:
> > > >+123.123456789012x1234
> > > >
> > > >Question: is the space required or optional?
> > > >
> > > >Rich Shockney
> > > >RS Marketing
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > >Sent: Thursday, September 27, 2001 4:34 PM
> > > >Subject: OpenSRS Live Reseller Update 09/27/01
> > > >
> > > >
> > > >Greetings -
> > > >
> > > >Please find following an update on OpenSRS.
> > > >
> > > >1. Upcoming scheduled downtime
> > > >2. New text added to transfer confirmation messages
> > > >3. .ca expiry date changes
> > > >4. .info - WHOIS Delayed
> > > >5. .info - Real-Time Registration - phone number validation
> > > >6. .info status messages for pre-registrations
> > > >
> > > >1. Upcoming scheduled downtime
> > > >-----------------
> > > >Our LIVE environment will be taken offline for a
> > > >registry imposed maintenance window from:
> > > >
> > > >Date: Sunday, September 30, 2001
> > > > Saturday, September 29, 2001
> > > >
> > > >Time: 0100 hrs - 0500 hrs UTC/GMT
> > > > 2100 hrs - 0100 hrs EDT
> > > >
> > > >The estimated length of this downtime is 4 hours.
> > > >
> > > >This maintenance window has been set by the gTLD registry
> > > >operator, and will affect all ICANN accredited registrars
> > > >equally. We apologize for any inconvenience this may
> > > >cause you.
> > > >
> > > >
> > > >2. New text added to transfer confirmation messages
> > > >-------------------
> > > >
> > > >The following text will be added to the Transfer
> > > >Confirmation messages (sent to Administrative
> > > >Contacts to approve transfers TO Tucows from other
> > > >Registrars) on Monday, October 1st 2001:
> > > >
> > > >"Even after completing this particular transfer
> > > >confirmation, your current Registrar may ALSO require you
> > > >to confirm your transfer request (a second time). If you
> > > >do receive an additional transfer notice, please be
> > > >certain to confirm it as promptly as possible; delaying
> > > >your response may jeopardize the success of your transfer
> > > >request.
> > > >
> > > >Please also be advised that your domain transfer may be
> > > >declined by your current Registrar if your domain expires
> > > >within 30 days of your transfer request. If you believe
> > > >your domain to be within this period, please contact your
> > > >current Registrar to verify the status of your domain,
> > > >and to ensure that they will allow the release of your
> > > >domain if it has not yet passed its expiry/anniversary
> > > >date."
> > > >
> > > >We are adding this text hoping that it will help your
> > > >clients understand that processes that they may still
> > > >be required to follow, and also, hoping that more
> > > >transfers will complete as quickly and easily as
> > > >possible.
> > > >
> > > >
> > > >3. .ca expiry date changes
> > > >-------------------
> > > >
> > > >Any .ca names that were set to expire between November 8,
> > > >2001 and November 30, 2001 have had their expiry dates
> > > >set to December 1, 2001 by CIRA.
> > > >
> > > >We apologize if any of your registrants received renewal
> > > >notices quoting the old dates. We are in the process
> > > >of updating our database so that we show the correct
> > > >expiry date.
> > > >
> > > >4. .info - WHOIS Delayed
> > > >-------------------
> > > >
> > > >The Afilias registry encountered problems processing
> > > >pre-registrations and as a result, have made an
> > > >announcement that names would be delayed from being
> > > >listed in the WHOIS. This will also delay our updating
> > > >of the RWI to show the status of .info pre-registrations.
> > > >Resellers can begin checking the RWI at 10:00am EST,
> > > >Friday, October 28, 2001 to determine their successful
> > > >and unsuccessful registrations. Please note - processing
> > > >could take up to 12 hours to complete. As per previous
> > > >communications, resellers will also receive an email
> > > >notification of successful and unsuccessful registrations
> > > >approximately 48 hours after the WHOIS is published.
> > > >
> > > >
> > > >5. .info - Real-Time Registration - phone number validation
> > > >-------------------
> > > >
> > > >Resellers who plan on offering .info via the client code
> > > >once real-time registration is available should note the
> > > >following telephone number restrictions:
> > > >
> > > >This is the regexp to validate the phone number for .info:
> > > >
> > > > if ( $phone !~ /^\+\d{1,3}\.\d{1,12}(x\d{1,4})?$/ ) {
> > > > # do something to tell the registrant about
> the bad phone
> > > >number
> > > > # return "phone number has to be in a
> +1.4165551122x1234
> > > >format.\n";
> > > > }
> > > >
> > > >Resellers can enter this in
> > > >OpenSRS::XML_Client::validate() with an "if .info" wrapped around
it.
> > > >
> > > >
> > > >6. .info status messages for pre-registrations
> > > >-------------------
> > > >
> > > >For clarification on exact status for pre-registered
> > > >.info names, please reference the following link:
> > > >
> > > >http://www.opensrs.org/dotinfo_info.shtml
> > > >
> > > >
> > > >As always - thanks for your continued support of OpenSRS!
> > > >
> > > >Thanks -
> > > >
> > > >Ken Joy
> > > >Product Manager, OpenSRS
> > > >[EMAIL PROTECTED]
> > >
> > >
> > >
> >
>
> ---------------------------------------
> -erol M
> Life is the sieve through which my anarchy strains
> Resolving itself into works.
>
> http://www.badreligion.com/history/PunkManifesto.html
>