how do you know someone’s worth being in a relationship with?

i have a bad history with relationships. i get attached to anyone and everyone who shows me attention and although i know how stupid i’m being i can never cut people off who don’t treat me well. my last boyfriend i FINALLY worked up the nerve to end it after two years because (in very simplified words) i was never prioritized and really didn’t feel like he cared about me. my question is, how many flaws can a person have and still be worth having in my life? obviously no two people are compatible in every single way but i guess i don’t think i want to spend my life with someone who i’m unhappy with just because i love them. idk i’m just trying to be realistic in the future? what sort of expectations are okay to “get over” if i want to settle down permanently? i guess i’m just nervous. i never had any positive examples of healthy love in my life so i have no idea.