Friends, I have a question that I would like someone to give me a solution. I have a table created in bd postgres with campos id, name, code and state and I need to restrict and validate two fields.
the code field is of type string but it must save numbers only, that includes that the zero is read, for example that the code field being string stores 0001 but that DOES NOT save letter and so on. the state field must give three conditions. if it were 0 = canceled if it were 1 = working and if it were 2 = paralyzed. it is appreciated