user6611: I have a question but I cannot find a concrete answer for that. I have a smart contract developed in Plutus for managing locking and withdraw of Tokens/NFTs. I'm wondering if I can validate some metadata of my NFT onchain, in my validator script.
For example, imagining this NFT: https://pool.pm/asset16tkxq9yrk6lmkwld6vnz5m8f6j54gj376jy2xx
The metadata contains: Artist, Artist Website, Id, Rarity and so on; Can I get the information about the metadata onchain on my validation script? so I can verify an specific word contained on this attributes?
Thank you so much.

user2897: If the NFT was minted using a transaction with metadata (cardano-cli), then the Plutus script won't be able to access this information. This is because you can only feed UTxOs to Plutus validator scripts. UTxOs don't contain the data stored on the ledger.
If you are in this situation, I would solve your problem by getting the metadata of the NFT from the ledger (using a service like Blockfrost) and validating it BEFORE feeding the UTxO to the validator script. This way, if metadata doesn't match, then there's no point in continuing with the execution of the Plutus script.
On the contrary, if the NFT was minted using a Plutus minting policy, as per this tweet, you have the ability to store this information in the UTxOs, using TxWitness field, as part of the datum hash.

6611: <p>I have a question but I cannot find a concrete answer for that. I have a smart contract developed in Plutus for managing locking and withdraw of Tokens/NFTs. I'm wondering if I can validate some metadata of my NFT onchain, in my validator script.</p>
<p>For example, imagining this NFT: <a href="https://pool.pm/asset16tkxq9yrk6lmkwld6vnz5m8f6j54gj376jy2xx" rel="nofollow noreferrer">https://pool.pm/asset16tkxq9yrk6lmkwld6vnz5m8f6j54gj376jy2xx</a></p>
<p>The metadata contains: Artist, Artist Website, Id, Rarity and so on; Can I get the information about the metadata onchain on my validation script? so I can verify an specific word contained on this attributes?</p>
<p>Thank you so much.</p>
 2897: <p>If the NFT was minted using a transaction with metadata (<code>cardano-cli</code>), then the Plutus script won't be able to access this information. This is because you can only feed UTxOs to Plutus validator scripts. UTxOs don't contain the data stored on the ledger.</p>
<p>If you are in this situation, I would solve your problem by getting the metadata of the NFT from the ledger (using a service like <a href="https://docs.blockfrost.io/#tag/Cardano-Metadata" rel="nofollow noreferrer">Blockfrost</a>) and validating it BEFORE feeding the UTxO to the validator script. This way, if metadata doesn't match, then there's no point in continuing with the execution of the Plutus script.</p>
<p>On the contrary, if the NFT was minted using a Plutus minting policy, as per <a href="https://twitter.com/dcspark_io/status/1420927974480637953" rel="nofollow noreferrer">this tweet</a>, you have the ability to store this information in the UTxOs, using <code>TxWitness</code> field, as part of the datum hash.</p>
