
715 S.E.2d 613 (2011)
Timothy Scott BOBBITT, by Sasha DeeAnn BOBBITT, his attorney-in-fact, Plaintiff,
v.
Kellie Lynn EIZENGA, Defendant.
No. COA10-1580.
Court of Appeals of North Carolina.
September 6, 2011.
*614 The Dummit Law Firm, Winston-Salem, by Cerene O. Setliff, for plaintiff.
No brief filed for defendant.
THIGPEN, Judge.
Timothy Bobbitt was convicted of attempted statutory rape of Kellie Eizenga, an act which resulted in the birth of a child.[1] We must determine whether the trial court erred in dismissing Bobbitt's claim for visitation because of his conviction and sex offender status. Because there is no law preventing Bobbitt from claiming visitation rights with his child, we reverse and remand.
In November 2009, Bobbitt pled guilty to attempted statutory rape of Eizenga. Bobbitt was sentenced to 94 to 122 months in prison and was required to register as a sex offender for 30 years upon release from prison. As a result of the attempted statutory rape, Eizenga gave birth to L.W. in March 2010. Bobbitt was not listed as the biological father on L.W.'s birth certificate, and Eizenga gave L.W. the last name of Eizenga's boyfriend at the time of L.W.'s birth. However, a paternity test indicated a 99.99% probability that Bobbitt is the father of L.W.
While incarcerated, Bobbitt filed a complaint seeking joint legal custody and reasonable visitation with L.W., a change of L.W.'s last name, and visitation rights for Bobbitt's parents. On 3 March 2010, Eizenga filed a motion to dismiss for failure to state a claim. After a hearing on 26 July 2010, the trial court filed an order on 27 August 2010 granting Eizenga's motion to dismiss. Bobbitt appeals.
On appeal, Bobbitt contends the trial court erred by (I) dismissing his action for visitation because he was not convicted of a crime that would cause him to lose visitation rights, (II) finding that Bobbitt cannot have any contact with L.W. because of his status as a sex offender, and (III) finding that visitation is impossible.

I. Effect of Attempted Statutory Rape Conviction
Bobbitt first argues the trial court erred by dismissing his action for visitation because he was not convicted of a crime that *615 limits his right to seek custody or visitation. We agree.
We review a motion to dismiss for failure to state a claim de novo. S.N.R. Mgmt. Corp. v. Danube Partners 141, LLC, 189 N.C.App. 601, 606, 659 S.E.2d 442, 447 (2008) (citation omitted). "The standard of review of an order granting a 12(b)(6) motion is whether the complaint states a claim for which relief can be granted under some legal theory when the complaint is liberally construed and all the allegations included therein are taken as true." Guyton v. FM Lending Services, Inc., 199 N.C.App. 30, 33, 681 S.E.2d 465, 469 (2009) (citation and quotation marks omitted). "On a motion to dismiss, the complaint's material factual allegations are taken as true." Id. (citation and quotation marks omitted). Dismissal is proper when one of the following three conditions is satisfied: "(1) the complaint on its face reveals that no law supports the plaintiff's claim; (2) the complaint on its face reveals the absence of facts sufficient to make a good claim; or (3) the complaint discloses some fact that necessarily defeats the plaintiff's claim." Id. (citation and quotation marks omitted).
Pursuant to N.C. Gen.Stat. § 50-13.1(a) (2009), any parent or relative claiming the right to custody of a minor child may institute an action for custody of or visitation with the child. However, "[a]ny person whose actions resulted in a conviction under G.S. 14-27.2 [first-degree rape] or G.S. 14-27.3 [second-degree rape] and the conception of the minor child may not claim the right to custody [or visitation] of that minor child."[2]Id.
In this case, the trial court found as fact that Bobbitt "had been convicted of attempted statutory rape of [Eizenga] which caused the birth of the minor child" and that Bobbitt "was given an active sentence of 94 to 122 months in prison and is required to register as a sex offender for 30 years once he is released from prison." The court concluded Bobbitt "is not entitled to visitation with the minor child as a result of his conviction [of attempted statutory rape] and sex offender status." Bobbitt correctly contends that a conviction of attempted statutory rape does not preclude him from claiming visitation rights under N.C. Gen.Stat. § 50-13.1(a).
Pursuant to N.C. Gen.Stat. § 50-13.1(a), any person whose actions resulted in a conviction of first-degree rape or second-degree rape and the conception of a minor child may not claim the right to custody or visitation of that minor child. Bobbitt, however, was convicted of attempted statutory rape, not first-degree rape or second-degree rape. N.C. Gen.Stat. § 50-13.1(a) does not prevent a person convicted of attempted statutory rape that resulted in the conception of a child from claiming visitation rights to that child. Similarly, in the context of an adjudication order, this Court has explained that "[e]ven if respondent were eventually indicted and convicted of statutory rape . . . such a conviction would not result in respondent losing his parental rights[.]" In re J.L., 183 N.C. App. 126, 131, 643 S.E.2d 604, 607 (2007). Thus, the trial court erred by concluding that Bobbitt is not entitled to visitation as a result of his conviction of attempted statutory rape and by dismissing Bobbitt's complaint on that basis.

II. Sex Offender Status
Bobbitt next argues the trial court erred in concluding that he is not entitled to visitation with his child due to his status as a sex offender. We agree.
Although the North Carolina Sex Offender and Public Protection Registration Program prevents sex offenders from certain activities involving minor children, see N.C. Gen.Stat. § 14-208.16(a) (2009) (a sex offender "shall not knowingly reside within 1,000 feet of the property on which any public or nonpublic school or child care center is located"); N.C. Gen.Stat. § 14-208.17 (2009) (unlawful for a sex offender to work "at any place where a minor is present and the person's responsibilities or activities would include instruction, supervision, or care of a minor or minors"), there are no provisions preventing a parent from having contact with their child. In fact, at least one of the statutes contemplates a sex offender having contact with their child. *616 Specifically, N.C. Gen.Stat. § 14-208.18 (2009) allows a registered sex offender who is a parent or guardian of a minor to be present on certain premises with the minor for the purposes specified in the statute.
In this case, the trial court found as fact that "it would be a violation of the current criminal law in the State of North Carolina for [Bobbitt] to be around the minor child which is the subject of this action" and that "visitation is an impossibility as a result of his conviction and sex offender status as he is not entitled to visitation under the current criminal laws." The court then concluded Bobbitt "is not entitled to visitation with the minor child as a result of his conviction and sex offender status." Our review of North Carolina statutes and case law has revealed no law that would prevent a parent from claiming visitation rights with their child on the basis of their status as a sex offender. Therefore, the trial court erred by concluding that Bobbitt is not entitled to visitation as a result of his status as a sex offender.
Absent legislation prohibiting a person whose actions resulted in a conviction of attempted statutory rape and the conception of a minor child from claiming the right to custody or visitation of that minor child, we find no basis upon which to rule Bobbitt is not entitled to claim visitation. Thus, taking Bobbitt's factual allegations as true, we hold Bobbitt has sufficiently stated a claim for custody and visitation of L.W. As a result, we reverse the trial court's order granting Eizenga's motion to dismiss pursuant to N.C. Gen.Stat. § 1A-1, Rule 12(b)(6) and remand this case to the trial court for further proceedings on the merits of Bobbitt's claims pursuant to the appropriate statutory procedures applicable to custody and visitation disputes.
Because we conclude the trial court erred in dismissing Bobbitt's complaint, we will not address his remaining argument.
REVERSED AND REMANDED.
Chief Judge MARTIN and Judge STEPHENS concur.
NOTES
[1]  In his brief, Bobbitt states he pled guilty to attempted statutory rape. However, the record is void of any explanation of how completion of the elements necessary to constitute the offense of attempted statutory rape resulted in the birth of a child.
[2]  N.C. Gen.Stat. §§ 14-27.2(c) and 14-27.3(c) (2009) similarly state that "[u]pon conviction, a person convicted under this section has no rights to custody of or rights of inheritance from any child born as a result of the commission of the rape, nor shall the person have any rights related to the child under Chapter 48 or Subchapter 1 of Chapter 7B of the General Statutes."
